9 Date Display Format: Import Java.util. *; Import Java.Text. *; Public Class Formator {Public Static Void Main (String [] args) {Date Now = New Date (); DateFormat DefaultFormat = DateFormat. getDateInstance (); DateFormat shortFormat = DateFormat.getDateInstance (DateFormat.SHORT); DateFormat mediumFormat = DateFormat.getDateInstance (DateFormat.MEDIUM); DateFormat longFormat = DateFormat.getDateInstance (DateFormat.LONG); DateFormat fullFormat = DateFormat.getDateInstance (DateFormat.FULL ); String defaultDate = defaultFormat.format (now); String shortDate = shortFormat.format (now); String mediumDate = mediumFormat.format (now); String longDate = longFormat.format (now); String fullDate = fullFormat.format (now ); System.out.println ("(default) Today:" defaultdate); system.out.println ("(Short) Today:" shortdate); system.out.println ("(Medium) Today: Mediumdate; system.out.println ("(long) Today:" longdate); system.out.println ("(full) Today:" fulldate);}} Run Results: D: / JavaMail> Java Formatdat e (default) Today: 2003-6-15 (short) Today: 03-6-15 (Medium) Today: 2003-6-15 (long) Today: June 15, 2003 (Full) Today: 2003 6 What is the difference between 10 static and non-static nesses? Static Internal Class Means: 1 Create a Static Internal Class, no need to access an external class object 2 You cannot access an external class object 11 from an object of a Static Internal class 11 how to determine the input stuff is a character or a number? use float .PARSEFLOAT (String Data) There is no number if you have Numberformatexception. If you use streamTokenizer, there is streamTokenizer.ttype, you can determine if it is a number. You can also determine if there is a number of characters if you can CHARACTER.ISDIGIT (CHAR CH).