FileDocCategorySizeDatePackage
InnerClass3.javaAPI DocExample413Sat Nov 25 12:55:42 GMT 2000None

InnerClass3

public class InnerClass3 extends Object
Demonstrate inner-inner class. A named inner class is used to show that it can access non-local variables in the enclosing object.

Fields Summary
static String
msg
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] av)


	     
		class Inner {
			public void doTheWork() {
				// print member of enclosing class
				System.out.println(msg);
			}
		}
		Inner p = new Inner();
		p.doTheWork();