Quote:
|
Originally Posted by titaniumdecoy
No, one is a basic data type and the other is an object.
|
Yes, but in the context of ArrayList, you cannot specify <int>. You must use <Integer>. You may then use it as a int.
Such as:
myArray.add(5);
if (myArray.get(0) == 5) {
System.out.println("Yep, it was 5");
}