class X {
Y b = new Y();
static {
System.out.println("HelloWorld");
}
{
System.out.println("How are you ?");
}
X() {
System.out.print("X");
}
}
class Y {
Y() {
System.out.print("Y");
}
}
class Z extends X {
Y y = new Y();
Z() {
System.out.print("Z");
}
}
class Demo
{
public static void main(String[] args)
{
new Z();
}
}
|
|