Hi..
I have the following qwestion ...
Can anyone explain me the answer?
___________________________________________________________
What will happen when you attempt to compile and run the following code?
class TSamp extends Thread{
public native
String getTime();
}
public class Multi implements Runnable {
boolean bStop;
public static void main(String argv[]){
Multi m = new Multi();
m.go();
}
public void go(){
TSamp ts = new TSamp(this);
ts.start();
bStop=true;
}
public void run(){
if(bStop==true){
return;
}
System.out.println("running");
}
}
Answer : Compile time error.
Thanks in advance,
Regards,
rajani.