Hi ,
I am new to
Java programming,I need help from you guys..
I saw this question in mock exam and I though the answer is
"starting" and "done",but it's printing only"starrting"..where as if I replace yield()in place of suspend()it is printing both..
I remember reading some where suspended threads canbe restarted..
if that is the case why it is not printing both words..
Thanks in advance.....
here is the program
class demo1 extends
Thread {
public void run( ) {
System.out.println("Starting");
suspend( );
resume( );
System.out.println("Done");
}
public static void main(
String args[ ]) {
demo1 tt = new demo1( );
tt.start( );
}
}