MCPcopy
hub / github.com/DuGuQiuBai/Java / InnerClassTest2

Class InnerClassTest2

day10/code/06_内部类/InnerClassTest2.java:20–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

18*/
19
20class 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}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected