11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println(”B”); } 16. } 17. public static void main(String[] args) { 18. new B().process(); 19. } What is the result?()
第1题:
Which statements about static inner classes are true?()
第2题:
11. public static void append(List list) { list.add(”0042”); } 12. public static void main(String[] args) { 13. List
第3题:
42
0042
An exception is thrown at runtime.
Compilation fails because of an error in line 13.
Compilation fails because of an error in line 14.
第4题:
B
The code runs with no output.
Compilation fails because of an error in line 12.
Compilation fails because of an error in line 15.
Compilation fails because of an error in line 18.
第5题:
B
The code runs with no output.
An exception is thrown at runtime.
Compilation fails because of an error in line 15.
Compilation fails because of an error in line 18.
Compilation fails because of an error in line 19.
第6题:
A static inner class requires a static initializer.
A static inner class requires an instance of the enclosing class.
A static inner class has no reference to an instance of the enclosing class.
A static inner class has access to the non-static members of the outer class.
Static members of a static inner class can be referenced using the class name of the static inner class.
第7题:
Foo.beta() is a valid invocation of beta().
Foo.alpha() is a valid invocation of alpha().
Method beta() can directly call method alpha().
Method alpha() can directly call method beta().
第8题:
第9题:
Given an EL function declared with:11.
第10题:
Given: 11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println("B "); } 16. } 17. public static void main(String[] args) { 18. A a = new B(); 19. a.process(); 20. } What is the result? ()
第11题:
args.count
args.length
args.count()
args.length()
args.getLength()
第12题:
0
1
3
4
第13题:
Apply an import policy to OSPF that injects the static routes into OSPF
Apply an import policy to the static routes that injects the static routes into OSPF
Apply an export policy to the static routes that injects the static routes into OSPF
Apply an export policy to OSPF that injects the static routes into OSPF
第14题:
The program runs and prints “0”
The program runs and prints “1”
The program runs but aborts with an exception.
An error “possible undefined variable” at line 4 causes compilation to fail.
An error “possible undefined variable” at line 9 causes compilation to fail.
第15题:
The function method must have the signature: public String spin().
The method must be mapped to the logical name spin in the web.xml file.
The function method must have the signature: public String spinIt().
The function method must have the signature public static String spin().
The function method must have the signature: public static String spinIt().
The function class must be named Spinner, and must be in the package com.example.
第16题:
An anonymous class can be declared as static.
A static inner class cannot be a static member of the outer class.
A static inner class does not require an instance of the enclosing class.
Instance members of a static inner class can be referenced using the class name of the static inner class.