the following code gives 1 as output
please is there any body can explin the logic and correct thinking
pattern to get that answer
class B extends
Thread {
B(){}
B(B a){}
public void run(){
System.out.println("1");
}
}
class A extends B {
A(){}
A(B a){}
public void run(){
System.out.println("2");
}
public static void main(
String as[]){
Thread a =new B (new A());
a.start();
}
}