my dog learned polymorphism*
The moose likes Java in General and the fly likes block with out identifier Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "block with out identifier" Watch "block with out identifier" New topic
Author

block with out identifier

saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
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


A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

This is called "Instance initializers" and is executed before constructors.


[My Blog]
All roads lead to JavaRanch
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

The following article explains it all:

Object initialization in Java - The full story of object initialization in the Java language and virtual machine


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: block with out identifier
 
Similar Threads
instance init block concept
Block (not static)in a class...??
what wrong with my code?
Initialization Blocks
Static Blocks