class A extends Thread{
public void main(){
System.out.println("A");
}
A(Runnable r){
super(r);
}
A(){
}
}
class B implements Runnable{
public void run(){
System.out.println("B");
}
}
class C{
public static void main(
String ar[]){
A a = new A();
B b = new B();
Thread t =new Thread();
a.start();
b.start();// this is a compilation error //line 1
t.start();
}
}
in the above code syntax line 1 gives a compile error why's that?
do i have to use a construcor if i implement the runnable interface