| 18 | */ |
| 19 | |
| 20 | class InnerClassTest2 { |
| 21 | public static void main(String[] args) { |
| 22 | //���������PersonDemo���method���� |
| 23 | /* |
| 24 | PersonDemo pd = new PersonDemo(); |
| 25 | Person p = new Student(); |
| 26 | pd.method(p); |
| 27 | */ |
| 28 | |
| 29 | //������������ |
| 30 | //new PersonDemo().method(new Student()); |
| 31 | |
| 32 | //�����ڲ������� |
| 33 | new PersonDemo().method(new Person(){ |
| 34 | public void show() { |
| 35 | System.out.println("show student"); |
| 36 | } |
| 37 | }); |
| 38 | |
| 39 | new PersonDemo().method(new Person(){ |
| 40 | public void show() { |
| 41 | System.out.println("show teacher"); |
| 42 | } |
| 43 | }); |
| 44 | } |
| 45 | } |
nothing calls this directly
no outgoing calls
no test coverage detected