반응형 예외처리1 [Java] CheckedException과 UncheckedException의 차이 💡CheckedException 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 import java.io.File; import java.io.FileNotFoundException; import java.util.Scanner; public class CheckedExceptionExample { public static void main(String[] args) { try { File file = new File("non_existent_file.txt"); Scanner scanner = new Scanner(file); while (scanner.hasNextLine()) { System.out.println(scanner.nextLine()); } sca.. 2023. 10. 11. 이전 1 다음 반응형