Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

block with out identifier

 
saikrishna cinux
Ranch Hand
Posts: 689
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi to all



why init is displayed before Const??

what is that block called there is no identifier

can any please explain me

thanking you in advance


regards
cinux
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is called "Instance initializers" and is executed before constructors.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15288
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The following article explains it all:

Object initialization in Java - The full story of object initialization in the Java language and virtual machine
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic