List list=new ArrayList<>();
Random random = new Random();
int n = random.nextInt(list.size());
System.out.println(list.get(n));
List取随机
最新推荐文章于 2024-04-30 18:37:52 发布
List list=new ArrayList<>();
Random random = new Random();
int n = random.nextInt(list.size());
System.out.println(list.get(n));