If you want something with a fixed size, what's wrong with an array?
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joined: Feb 04, 2010
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