This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan 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 Android Security Essentials Live Lessons this week in the Android 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: 19655
    
  18

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
 
Similar Threads
Arrays
What is the order of Initialization
Static Constructor in Java
Core Java
use of static block and constructor