-1

コードで使用したい:「Thread.sleep(10000);」私の逃げ道で

netbeans では機能し、「import java.io .; import java.net .; 」を含めました。それで、それを使用するにはmyeclipseで何をすべきですか

ありがとう

4

1 に答える 1

0

発生する可能性のある例外を確実に処理する必要があります。try/catch ステートメントを追加すると、うまくいきます。

    try {
       Thread.sleep(500);
    } catch(InterruptedException e) {
       Thread.currentThread().interrupt(); 
    }

お役に立てれば!

于 2013-09-20T21:34:04.777 に答える