单项选择题
A. finished
B. Compilation fails.
C. An AssertionError is thrown and finished is output.
D. An AssertionError is thrown with the message “assertion failed”.
E. An AssertionError is thrown with the message “assertion passed”.
单项选择题 public class X { public static void main(String [] args) { try { badMethod(); System.out.print(“A”); } catch (RuntimeException ex) { System.out.print(“B”); } catch (Exception ex1) { System.out.print(“C”); } finally { System.out.print(“D”); } System.out.print(“E”); } public static void badMethod() { throw new RuntimeException(); } } What is the result?()
多项选择题 switch(x) { default: System.out.println(“Hello”); } Which two are acceptable types for x?()
单项选择题 Youwanttolimitaccesstoamethodofapublicclasstomembersofthesameclass.Whichaccessaccomplishesthisobjective?()