public static void main(String[] args){ //创建一个int数组,长度为100, int n = 100; int[] arrayInt = new int[n]; Random random = new Random(); ArrayList myList = new ArrayList(); while(myList.size() < 100){ //随机函数生成0-100的整数 int num = random.nextInt(101); //myLi…