Why nothing will be printed?
If you did not override the method toString() in any classes, then the default
String representation would have been printed i.e ClassName + "@" + Integer.toHexString(hashCode()) of the object because that is the default behaviour of object written in Object class's toString() method.
Generally when we print object this is printed.
As because you have overridden the toString() method that is why it is giving output 43 , first calling super method's toString() (i.e "4") then Sub class's toString() (i. "3") method.
If you had overrided the toString() method only in class B then output would have been different. In that case first it would call the default implementation of Object class then it will append "3" of the toString() method of B to the default result of Object class's toString() method.