This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
It's a bit like asking "what is the difference between a hammer and a hammerhead shark? Which one is better?"
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
To fully understand this, let's look at the sequence of events. Consider the following simple class.
Now suppose we are in another class. Supppse this line
is the first instance of a Minter object that is declared. At that time, the Java class loader will load the code for the Minter class. First, all of the static stuff is seen to. In an area of memory shared by all instances of the class, go the static instance variables and methods. This includes the constructors. The static block is executed. All this occurs before the birth of the dirst object.
Next, the first instance of the Minter class is created. It gets assigned the first ID. Each new instance of a Minter gets an ID one higher than its predecessor.