| Author |
DateFormat question
|
adam Lui
Ranch Hand
Joined: Sep 03, 2007
Posts: 186
|
|
in order to successfully print that Date, I am trying to fix this code. (question copied from K&B book, chapter 6, p511) can you help me to fix? this topic is still really confusing me!
|
boolean b = true;<br />System.out.println ("I believe in Java.<br />Java will make my dream come " + b);
|
 |
Jesper de Jong
Java Cowboy
Bartender
Joined: Aug 16, 2005
Posts: 12928
|
|
Class DateFormat is an abstract class. You cannot instantiate an abstract class, as you are doing in line 5 of your code. Replace line 5 with something like this: And you also need to import java.util.Date.
|
Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
|
 |
 |
|
|
subject: DateFormat question
|
|
|