my dog learned polymorphism*
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 Android Security Essentials Live Lessons this week in the Android 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: 18541
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Initilization Block : Why my code goes in loop in initilization block ?
 
Similar Threads
doubt on mutiple inheritance
Getting the current method that this executing.
constructor with private access modifier
Object and reference accessing for primitives, objecst and collections
Creating objects using Reflection