File: E1.java

package info (click to toggle)
eclipse-jdt-ui 4.10-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 82,480 kB
  • sloc: java: 694,753; xml: 12,788; jsp: 33; makefile: 5
file content (34 lines) | stat: -rw-r--r-- 490 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package p;

public class E1 {
	
	// Test warning if anonymous class cannot be qualified.
	
	public class E1Inner1 {
		public void foo() {}
		protected int n;	
	}
	public class E1Inner2 {
		public void run() {}
	}

	public void foo() {
		E1Inner1 inner= new E1Inner1() {

			public void foo() {
				E1Inner2 inner2= new E1Inner2() {
					public void run() {
						foo();
					}
				};
			}
		};
	}

	{
		E1Inner1 inner1= new E1Inner1();
		inner1.foo();					// <--------- invoke here
	}
	

}