An inner class may be declared as static.
An anonymous inner class can be declared as public.
An anonymous inner class can be declared as private.
An anonymous inner class can extend an abstract class.
An anonymous inner class can be declared as protected.
第1题:
1. public class Outer{ 2. public void someOuterMethod() { 3. // Line 3 4. } 5. public class Inner{} 6. public static void main( String[]argv ) { 7. Outer o = new Outer(); 8. // Line 8 9. } 10. } Which instantiates an instance of Inner?()
第2题:
package foo; public class Outer { public static class Inner { } } Which statement is true?()
第3题:
Static Nested Class 和 Inner Class 的不同。
参见前面的什么是内部类的那道题
第4题:
package foo; public class Outer ( public static class Inner ( ) ) Which statement is true? ()
第5题:
Which thefollowingstatements about static inner classes is true?()
第6题:
Which two statements are true?()
第7题:
Which statements can be inserted at the indicated position in the following code to make the program write 1 on the standard output when run?() public class Q4a39 { int a = 1; int b = 1; int c = 1; class Inner { int a = 2; int get() { int c = 3; // insert statement here return c; } } Q4a39() { Inner i = new Inner(); System.out.println(i.get()); } public static void main(String args[]) { new Q4a39(); } }
第8题:
Which statements concerning the correlation between the inner and outer instances of non-static inner classes are true?()
第9题:
Anonymous Inner Class(匿名内部类)是否可以extends(继承)其它类,是否可以implements(实现)interface(接口)?
第10题:
Which the following two statements are true?()