We can put code in a constructor or a method or an initialization block. What is the use of initialization block? Is it necessary that every java program must have it?
In addition to what was said in previous answers, blocks can be synchronized .. never felt I need to use it, however,it's there
synchronized