これが私のコードです
try{
System.out.println("Before");
thread.sleep(10000);//sleep for 10000 ms
System.out.println("After");
}
catch(ItrerruptedException ie){
//If this thread was intrrupted by nother thread
}
スレッドが正確に 10 秒間スリープしてから印刷するかどうか、After
または遅延があるかどうかを知りたいだけですか?