Nitesh Nandwana wrote:
At first i want to say that you should start from beginning.It's important to know java code conventions.Way you coded , is it really easy to read ?
Riza Aktunc wrote:When a constructor is called, on the first line super() is called implicitly. There is just one exception. If the first line is this(...) or super(...), then super() is not called. Considering this information:
In main the constructor of C is called.
From C's constructor, B's constructor is called.
From B's constructor, A() is called.
From A(), A("d") is called.
A("d") makes s="-d"
A() makes s="-da"
B() makes s="-dab"
C() makes s="-dabc"
main prints "-dabc"
Vijay keshava wrote:
Please note that the A and B have a package declaration xcom.