This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
when evaluated produces the o/p as follows: A's static B's static A's Instance A's Constructor B's Instance B's Constructor Why after A's static, the flow comes to B's static, why not complete the A's instance and constructor call ???
First static block code is executed when the class is loaded into the JVM.Then comes the Initializing blocks of the first class of the inheritance tree and then the constructor of it,this is because every constructor contains an call to its super constructor(The main point is Initializing blocks run just before the instance is created).This order comes down till the last class and continues with the rest of the code.
Joined: Jun 27, 2007
Hi Manfred, thanks -that's a pretty cool explanation. I must have tried to instantiate one more B.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com