33. try { 34. // some code here 35. } catch (NullPointerException e1) { 36. System.out.print(”a”); 37. } catch (RuntimeException e2) { 38. System.out.print(”b”); 39. } finally { 40. System.out.print(”c”); 41. } What is the result if a NullPointerException occurs on line 34?()
A、 c
B、 a
C、 ab
D、 ac
E、 bc
F、 abc
相关问题推荐
-
Which code, inserted at line 15, creates an instance of the Point class defined in Line?()
A、 Point p = new Point();
B、 Line.Point p = new Line.Point();
C、 The Point class cannot be instatiated at line 15.
D、 Line l = new Line(); l.Point p = new l.Point();
-
What is the result?()
A、 The value "4" is printed at the command line.
B、 Compilation fails because of an error in line 5.
C、 Compilation fails because of an error in line 9.
D、 A NullPointerException occurs at runtime.
E、 A NumberFormatException occurs at runtime.
F、 An IllegalStateException occurs at runtime.
-
What is the result?()
A、 hi hi
B、 hi world
C、 world world
D、 Compilation fails.
E、 An exception is thrown at runtime.
-
1. public class returnIt ( 2. returnType methodA(byte x, double y) ( 3. return (short) x/y * 2; 4. ) 5. ) What is the valid returnType for methodA in line 2?()
A、 Int
B、 Byte
C、 Long
D、 Short
E、 Float
F、 Double
-
You want subclasses in any package to have access to members of a superclass. Which is the most restrictive access that accomplishes this objective?()
A、 public
B、 private
C、 protected
D、 transient
E、 default access