예 : 파일을 열고 싶습니다. FileNotFoundException
이 표시되면 잠시 후 다시 시도해야합니다. 어떻게하면 좋을까요? 또는 중첩 된 try/catch
블록을 사용해야합니까?예외가 throw 된 경우 Java는 계속 루프를 실행합니다.
예 :
public void openFile() {
File file = null;
try {
file = new <....>
} catch(FileNotFoundException e) {
}
return file;
}
덕분에, 그것은 :) 너무 쉽게했다 – Chris
헤헤 .. 그래. 천만에요. – aioobe