連接:https://blog.csdn.net/bitcarmanlee/article/details/52719202dom
若是抽取1個的話.net
random.nextInt() % n == 0blog
判斷隨機數是不是 n的整數倍就能夠實現get