This week's book giveaway is in the OCAJP forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line!
See this thread for details.
The moose likes Java in General and the fly likes Constructor inside the static block Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Constructor inside the static block" Watch "Constructor inside the static block" New topic
Author

Constructor inside the static block

Hs Raveendran
Greenhorn

Joined: Feb 05, 2010
Posts: 23

Is it possible to write the constructor inside the static block of code.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19848
    
  20

Why don't you try it yourself?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Constructor inside the static block