This week's giveaway is in the EJB and other Java EE Technologies forum. We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line! See this thread for details.
it means you are creating Polymorphic reference. that is super class reference variable(class A) is refers to sub class object(Class C).
Since we extend super classes A and B in C,we have three overloaded methods in class C. so when we invoke using c2 reference variable , it will look for methods that are available in both the classes (A and C). In this case only one method is matched (super class A's method , which can accept all the sub types).
So that it prints AAA.
Make some changes At line 28 ==> C c2 = new C();
then it will print ABC