Which of the following can legally fill in the blank? (Choose all that apply.)
public class Main { static class Exception1 extends Exception { } static class Exception2 extends Exception1 { } public static void main(String[] args) throws Exception1 { try { //from www . j av a2 s . co m throw new Exception1(); } catch (Exception1 | RuntimeException e) { _________________ throw e; } } }
Exception()
;RuntimeException()
;A.
Since a multi-catch is used, the variable in the catch block is effectively final and cannot be reassigned.