why won't compile?

If anyone can assist with this simple problem..import java.util.*;public class HelloDate { public static void main (String[] args) {System.out.println("Hello, the date is: ");System.out.println(new Date()); }}
[265 byte] By [maxrangera] at [2007-11-26 12:46:23]
# 1
it would help if you told us the error, it works for me
spoon_a at 2007-7-7 16:26:40 > top of Java-index,Java Essentials,New To Java...
# 2
Is there a message from the compiler? Cut, paste and post the wholething.In this case - where it may be something about the compiler andits usage rather than the .java source which is the problem - post theexact command you are using to compile.
pbrockway2a at 2007-7-7 16:26:40 > top of Java-index,Java Essentials,New To Java...
# 3
I don't have my compiler here at work but I was getting constructor error that pointed to the word new in the second print statement. I'll retry it shortly.
maxrangera at 2007-7-7 16:26:40 > top of Java-index,Java Essentials,New To Java...
# 4

I just tried to compile the program but get an error. I don't have an IDE but the following is what's seen at the command prompt:

C:\Program Files\Java\CMIS141>type HelloDate.java

// HelloDate.java

import java.util.*;

class HelloDate {

public static void main (String[] args) {

System.out.println("Hello, it's: ");

System.out.println(new Date());

}

}

C:\Program Files\Java\CMIS141>javac HelloDate.java

HelloDate.java:7: cannot find symbol

symbol : constructor Date()

location: class Date

System.out.println(new Date());

^

1 error

maxrangera at 2007-7-7 16:26:40 > top of Java-index,Java Essentials,New To Java...
# 5
Did you create a class named Date?
cotton.ma at 2007-7-7 16:26:40 > top of Java-index,Java Essentials,New To Java...
# 6
the class is HelloDate.java. I shouldn't have to create a class called Date.java should I?
maxrangera at 2007-7-7 16:26:40 > top of Java-index,Java Essentials,New To Java...
# 7
> the class is HelloDate.java. I shouldn't have to> create a class called Date.java should I?No. But I think you did.The java.util.Date class certainly has a constructor Date() so it is puzzling that the compiler says it can't find it.
cotton.ma at 2007-7-7 16:26:40 > top of Java-index,Java Essentials,New To Java...