public class whiffler extends object implements Runnable
{
Thread myT;
public void start()
{
myT = new Thread(this);
}
public void run()
{
while(true)
{
dostuff();
}
System.out.println("Exiting run");
}
//more class code follows...............
Assume that the rest of the class defines dostuff() and so on and class compiles without error.Also assume that a
Java application creates a hiffler object and calls the Whiffler start method , that no other calls to Whiffler methods are made and the the thread in this object is the only one the application creates ..
a.dostuff () called repeatedly
b.dostuff() will never be excecuted
c. dostuff() will execute atleast once
d.statement in System.out.println() will never be reached
the answer is b & d
If some one can explain
This is from Exam cram page 182.
Wali