Java에서 다음 코드를 컴파일 할 수 없습니다. 오류는 다음과 같습니다. 잘못 배치 된 구문. 뭐가 문제 야?캐치 근처의 Java 코드에서 "잘못 배치 된 구문"
public class ExceptionsTutorial {
public static void main(String[] argv) throws Exception{
try{
System.out.println("A");
try{
System.out.println("B");
throw new Exception("1");
}
catch{
System.out.println("C");
throw new Exception("2");
}
finally{
System.out.println("D");
throw new Exception("3");
}
}
finally{
System.out.println("F");
}
}
}
컴파일러 오류가 무엇입니까? – theycallmemorty