1 List<Integer> list = new ArrayList<>(); 2 Random random = new Random(); 3 int n = random.nextInt(list.size()); 4 list.get(n);