81,115
社区成员




select top 10 from t
static int getValue() {
//假设这里就是你从数据库中读取的一组数字
int[] values = new int[] {
1, 2, 3, 4, 5, 6, 7, 8, 9};
int r = new Random().nextInt(10);
//然后在经过你的方法,删除数据库中取得的指定的值,就是删除values[r]
return values[r];
}
public static void main(String[] args) {
System.out.println(getValue());
System.out.println(getValue());
System.out.println(getValue());
System.out.println(getValue());
System.out.println(getValue());
}