/*
	ÄäÃûÄÚ²¿Àà£ºÃ»ÓÐÃû×ÖµÄÄÚ²¿Àà
	
	Ç°Ìá£º´æÔÚÒ»¸öÀà»òÕß½Ó¿Ú
			ÕâÀïµÄÀà¿ÉÒÔÊÇ¾ßÌåÀàÒ²¿ÉÒÔÊÇ³éÏóÀà¡£

	¸ñÊ½£º
		new ÀàÃû»òÕß½Ó¿ÚÃû() {
			ÖØÐ´·½·¨;
		}

	±¾ÖÊÀí½â£ºÆä±¾ÖÊÊÇÄäÃû×ÓÀà¶ÔÏó
*/
interface Inter {
	public abstract void show();
	public abstract void show2();
}

class Outer {
	private int num = 100;

	public void method() {
		//Ò»¸ö·½·¨
		/*
		new Inter() {
			public void show() {
				System.out.println("show");
			}
		}.show();
		*/

		
		//Á½¸ö·½·¨
		/*
		new Inter() {
			public void show() {
				System.out.println("show");
			}

			public void show2() {
				System.out.println("show2");
			}
		}.show();

		new Inter() {
			public void show() {
				System.out.println("show");
			}

			public void show2() {
				System.out.println("show2");
			}
		}.show2();
		*/

		//Á½¸ö·½·¨
		Inter i = new Inter() {
			public void show() {
				System.out.println("show");
			}

			public void show2() {
				System.out.println("show2");
			}
		};

		i.show();
		i.show2();
	}
}

class InnerClassDemo4 {
	public static void main(String[] args) {
		Outer o = new Outer();
		o.method();
	}
}
