Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Instance Initializer  RSS feed

 
Shiaber Shaam
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When a class gets loaded? What happens when the constructor is called? When is static block gets called? What is an instance initializer block?
 
David Byron
Rancher
Posts: 175
Clojure Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here....
 
Janeice DelVecchio
Bartender
Posts: 1810
12
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Understanding the order of operation for how a class gets loaded is really important.

Always remember Static blocks and members load before any instance members get loaded. Anything static gets loaded top to bottom.
Constructors always make a call to super() before doing their thing.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!