A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
In Java , when an object is created, initialization is done in this order:
.Set fields to default initial values (0, false, null)
.Call the constructor for the object (but don't execute the body of the constructor yet)
.Invoke the constructor of the superclass
.Initialize fields using initializers and initialization blocks
.Execute the body of the constructor
Originally posted by shilpa Reddy:
How do you know that call() of test14 class is invoked....why call() of class just not invoked...why is that b is not getting initialized at the first time....do reply..thanks