Thanks!

package com.codegym.task.task07.task0713;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.nio.Buffer;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
/*
1. Enter 20 numbers from the keyboard, save them in a list, and then sort them to three other lists:
Numbers divisible by 3 (x%3==0), numbers divisible by 2 (x%2==0), and all other numbers.
Numbers simultaneously divisible by 3 and 2 (for example 6) go into both lists.
The order in which the lists are declared is very important.
2. The printList method should display each list item on a new line.
3. Using the printList method, display these three lists. First, the list for x%3, then the list for x%2, and then the last list.
Requirements:
1. Declare and immediately initialize 4 ArrayList<Integer> variables. The first list will be the main one. The other lists will be supplementary.
2. Read 20 numbers from the keyboard and add them to the main list.
3. Add to the first supplementary list all numbers in the main list that are divisible by 3.
4. Add to the second supplementary list all numbers in the main list that are divisible by 2.
5. Add to the third supplementary list all the remaining numbers from the main list.
6. The printList method should display each element of the passed list on a new line.
7. The program should display the three supplementary lists using the printList method.
*/
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
int arrayListCount = 4;
ArrayList<Integer> myList[] = new ArrayList[arrayListCount];
for (int i = 0; i < arrayListCount; i++) {
myList[i] = new ArrayList<>();
}
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String userInput;
for (int i = 0; i < 20; i++) {
userInput = reader.readLine();
int randomNumber = Integer.parseInt(userInput);
myList[0].add(randomNumber);
}
for (int i = 0; i < myList[0].size(); i++) {
if (myList[0].get(i) % 3 == 0) {
myList[1].add(myList[0].get(i));
}
if (myList[0].get(i) % 2 == 0) {
myList[2].add(myList[0].get(i));
}
if (myList[0].get(i) % 3 != 0 && myList[0].get(i) % 2 != 0) {
myList[3].add(myList[0].get(i));
}
}
printList(myList[1]);
printList(myList[2]);
printList(myList[3]);
}
public static void printList(List<Integer> list) {
//write your code here
for (int i = 0; i < list.size(); i++) {
System.out.println(list.get(i));
}
}
}

4 ArrayList variableswhat you did wasan Array variable that stores 4 ArrayList in it