The call at line 7 is a3[2][1][0]. This returns the object of class A that was created earlier. Since this object is being used in a context where a it is being treated as a
string (i.e. it is being passed as a parameter to the println() method), the compiler inserts a call to the toString() method of the object.
This results in "A" being printed.
Hope this makes sense.