Hi...I was trying to play around with Kathy's given example on DateFormat Class in her SCJP book (page 480) but getting these following errors (Line 12, 13 and 16). Where is my mistake?
For line-12: It is showing this error: "The method getInstance() is undefined for the type DateFormat"
For line-13: It is showing this error: "DateFormat.SHORT cannot be resolved" AND
for line-16: It is showing this error: "The method format(Date) is undefined for the type DateFormat"
Any help please...
My Java Version is as follows:
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Sorry everyone....it was my Bad....I defined the Class name as the same name of the DateFormat Abstract class....and thats why compiler was complening. As soon as i changed my Class name, everything started running.