class A {public
String toString() {return "A";}}
class B {
public static void main(String[] arg) {
A[] a1 = new A[1]; // 1
A[][] a2 = new A[2][]; // 2
A[][][] a3 = new A[3][][]; // 3
a1[0] = new A(); // 4
a2[0] = a2[1] = a1; // 5
a3[0] = a3[1] = a3[2] = a2; // 6
System.out.print(a3[2][1][0]); // 7
}
}
What is the result of attempting to compile and run the above program?
This is a question in dan's single topic exams. The answer is "A". I have a question.
when I compile and run the program, i get a runtime exception saying that there is no such method in the main. Now what does that mean ?
Pls help...