Had a look, and I can't seem to find a question that is the same as this. My question is about int[]
in Java.
When you create an int[]
, you use this syntax:
int[] x = new int[5];
The methods that are part of int[]
also make me think it's an Object
, but it doesn't follow the Java naming convention for classes, which is what's confusing me. It is also an array of a primitive type, which can be used like a primitive.
Is an int[]
(or any primitive array I guess) an object, or a primitive?