FileDocCategorySizeDatePackage
InnerClass2.javaAPI DocExample482Sat Nov 25 12:55:42 GMT 2000None

InnerClass2

public class InnerClass2 extends Object
Demonstrate simple inner class which just extends an existing class (Date) by overriding one method in it.

Fields Summary
Constructors Summary
Methods Summary
voiddoWork()

		Date d = new Date() {
			public String toString() {
				return "Today is " + super.toString();
			}
		};
		System.out.println("My Date: " + d);
		System.out.println("Std Date: " + new Date());
	
public static voidmain(java.lang.String[] av)

		InnerClass2 p = new InnerClass2();
		p.doWork();