aspose file tools
The moose likes Beginning Java and the fly likes Initilization Block : Why my code goes in loop in initilization 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 » Beginning Java
Bookmark "Initilization Block : Why my code goes in loop in initilization block ?" Watch "Initilization Block : Why my code goes in loop in initilization block ?" New topic
Author

Initilization Block : Why my code goes in loop in initilization block ?

ashwin bhawsar
Ranch Hand

Joined: Mar 16, 2011
Posts: 62

Why the code goes into loop at line 3 ?

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 19118
    
    8

The initialization block creates a new SampleClass object.

This causes SampleClass's initialization block to run.

The initialization block creates a new SampleClass object.

This causes SampleClass's initialization block to run.

The initialization block creates a new SampleClass object.

This causes SampleClass's initialization block to run.

The initialization block creates a new SampleClass object.

This causes SampleClass's initialization block to run.

The initialization block creates a new SampleClass object.

This causes SampleClass's initialization block to run.

The initialization block creates a new SampleClass object.

This causes SampleClass's initialization block to run.

... do I need to continue?
ashwin bhawsar
Ranch Hand

Joined: Mar 16, 2011
Posts: 62

ya, i figured it out . Thanks.
 
wood burning stoves
 
subject: Initilization Block : Why my code goes in loop in initilization block ?