// Collection of code snippets by Arne Vajhøj 
// (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
public class Demo2 {
	// interface
	public static interface Fun {
		public void doit();
	}
	// test Fun instance
	public static void test(Fun f) {
		f.doit();
	}
	public static void main(String[] args) {
		test(new Fun() { // anonymous class that implements Fun
			@Override
			public void doit() {
				System.out.println("Demo 2 here");
			}
		});
	}
}
