package _5_18;
interface Exam {
void print1();
}
package _5_18;
public class Outer4 {
public Exam test() {
return new Exam() {
public void print1() {
System.out.println("Hello world!!");
}
};
}
public static void main(String args[]) {
Outer4 obj = new Outer4();
obj.test().print1(); // First part of the code
// Second part of the code
Outer4 c = new Outer4();
Exam e = c.test();
e.print1();
}
}
2596

被折叠的 条评论
为什么被折叠?



