ChatGPT - ArrayList in Java