my dog learned polymorphism
The moose likes Beginning Java and the fly likes static and initialization block Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

static and initialization block

vini singh

Joined: Dec 04, 2008
Posts: 18
class Bird
public Bird(){System.out.println("b2");
class Raptor extends Bird
public Raptor(){System.out.println("r2");}

class Hawk extends Raptor
public static void main(String s[])
new Hawk();

can you please tell me when exaclty is the class loaded in the memory and after which statement
James Tharakan
Ranch Hand

Joined: Aug 29, 2008
Posts: 580

Similar question

Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45415
Originally posted by James Tharakan:
Similar question

Agree. Shall close this thread.

Vini Singh: Please read this FAQ, and this one.
I agree. Here's the link:
subject: static and initialization block
It's not a secret anymore!