Edgar Avuzi
11/02/2024, 11:03 PMlistOf
returns java.util.Arrays$ArrayList
(as a mutable collection).
And at the same time, the returning list prohibits modification operationsYoussef Shoaib [MOD]
11/02/2024, 11:05 PMArrayList
you expect. It's a different one called Arrays.ArrayList
that implements the List
interface for Java Arrays, and hence it has a fixed length and doesn't permit add
Edgar Avuzi
11/02/2024, 11:09 PM