一道题,给100分
Which of the following statements are true?(Choose one or more)
A. Given that Inner is a non-static class declared inside a public class
Outer, and appropriate constructor forms are defined, an instance
of Inner may be constructed like this:
new Outer().new Inner()
B. If an anonymous inner class inside the class Outer is defined to
implement the interface ActionListener, it may be constructed
like this :
new Outer().new ActionListener()
C. Given that Inner is a non-static class declared inside a public class
Outer and appropriate constructor forms are defined, an instance
of Inner may be constructed in a static method like this:
new Inner()
D. An anonymous class instance that implements the interface
MyInterface may be constructed and returned from a method
like this:
return new MyInterface(int x){
int x;
public MyInterface(int x){
this.x = x;
}
};