표준에서 int를 읽으려고하면 컴파일 오류가 발생합니다.미해결 컴파일 : 처리되지 않은 예외 유형 IOException
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
Unhandled exception type IOException at SamplePackege.MainClass.main(MainClass.java:15)
가 어떻게이 오류를 해결합니까 :
System.out.println("Hello Calculator : \n");
int a=System.in.read();
이 프로그램은 예외를 throw?
내 코드 :
try {
Scanner sc = new Scanner(System.in);
int a=sc.nextInt();
} catch (Exception e) {
// TODO: handle exception
}
좋은 자바 튜토리얼을 먼저 얻으십시오. –
나는 더 나은 질문을하려고 노력하고 괜찮은 대답을 주었다. – ScArcher2