A
Arne Vajhøj
Philipp said:I don't understand that question (if it is one).
She is telling you that they does not exist,
Arne
Philipp said:I don't understand that question (if it is one).
public class TwoDim {
public static void main(String[] args) {
float[][] a = new float[3][3];
float[][] b = new float[3][];
b[0] = new float[2];
b[1] = new float[3];
b[2] = new float[4];
System.out.println(a.getClass().getName());
System.out.println(b.getClass().getName());
System.out.println(a instanceof float[][]);
System.out.println(b instanceof float[][]);
}
}
outputs:
[[F
[[F
true
true
float[][] a = new float[3][3];
is not a true two dimensional array - it is a quick way
to create an array of arrays when all the second level
arrays have the same length.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.