Olá pessoal tem um pergunta que estou com dúvida segue abaixo.
public void run(){
System.out.println("Start");
try{
Thread.sleep(1000);
System.out.println("Time's Up);
}catch(InterruptedException ex){
System.out.prinln("Interrupted!");
}
Qual a saída ? e a explicação
A - Exactly 10 seconds after the start method is called, ?Time?s UP! will be printed.
B - Exactly 10 seconds after ?Start? is printed, ?Time´s Up? will be printed.
C ?The delay between ?Start? being printed and ?Times?s Up! will be 10 seconds plus or minus one tck of the system clock
D ? If ?Times?s Up! is printed you can be sure that at least 10 seconds have elapsed since ?Start? was printed