fred rosenberger wrote:If you want something with a fixed size, what's wrong with an array?
Nothing wrong with an array, I am still trying to figure out how to use an array with ArrayList<Integer>.
The following has a compile time warning, which is the best solution.
How to fix it?
Type safety: The expression of type ArrayList needs unchecked conversion to conform to ArrayList<Integer>
The following will fail to compile:
Type mismatch: cannot convert from ArrayList<Integer> to ArrayList<Integer> ArrayListTest.java ArrayListTest/src
The following code will get java.lang.NullPointerException.
my overalls have superpowers - they repel people who think fashion is important. Tiny ad: