What will happen when you attempt to compile and run the following code?
public class BriarMill extends Thread{
public static void main(String argv[]){
BriarMill bm = new BriarMill();
bm.go();
}
public void go(){
start();
}
public void payBill(){
try{
wait();
}catch(InterruptedException ie){}
System.out.println("done");
}
public void run(){
payBill();
notifyAll();
}
}
1 - Compilation but runtime error.
2 - Compilation and output of done at runtime
3 - Compilation but no output at runtime, the program will run and wait with no output.
4 - Compile time error