These questions are purely asked out of curiosity. I don't actually need to subclass an array, I'm just trying to figure out more about how they work in Java.
Where is the Javadoc API for arrays? I found one for the 'Arrays' class, but that class just contains utilities to use on Java arrays, and is not the actual array class. This leads me to my next question:
IS there an actual array class of which all arrays are subclasses?
Is
Object[]a superclass ofString[](for example)? I'm guessing the answer here is no. Are these actual classes like any other class?Is
String[]a different class fromString[][]? OrString[][][], etc?As asked in the title, is it possible to subclass an array class (or to subclass THE array class? still not sure how it works as you can tell by my above questioning)? Could I create my own class, instances of which acted exactly like arrays, except they had more functionality?
Thanks.
instanceof. Did you try it?