So I've run into something odd and I don't know what it's called so I'm having trouble finding out information about it, hence my question here.
I've run into an issue where if you create an array of any type and call getClass on this array in Java you will get an odd return. I am wondering why you get this specific return and what it means.
Code example is as follows:
byte[] me = new byte[1];
int[] me2 = new int[1];
double[] me3 = new double[1];
float[] me4 = new float[1];
String[] me5 = new String[1];
Integer[] me6 = new Integer[1];
System.out.println(me.getClass());
System.out.println(me2.getClass());
System.out.println(me3.getClass());
System.out.println(me4.getClass());
System.out.println(me5.getClass());
System.out.println(me6.getClass());
and the output is:
class [B
class [I
class [D
class [F
class [Ljava.lang.String;
class [Ljava.lang.Integer;