It's not a secret anymore!*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Error Not Understand!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Error Not Understand!!!" Watch "Error Not Understand!!!" New topic
Author

Error Not Understand!!!

babul bansal
Greenhorn

Joined: Aug 11, 2007
Posts: 24
import java.util.*;

public class Dates2 {
public static void main(String []) {
Dates d1 = new Dates(1000000000000L);
System.out.println("Ist date: "d1.toString());
}
}

F:\scjp>javac Dates2
error: Class names, 'Dates2', are only accepted if annotation processing is expl
icitly requested
1 error



What this error says?
How will this code compile on jdk1.6?
subhasish nag
Ranch Hand

Joined: Apr 25, 2008
Posts: 101
I have modified a little in your code.Try with this

import java.util.*;

public class Dates2 {
public static void main(String []args) {
Date d1 = new Date(1000000000000L);
System.out.println("Ist date: "+d1.toString());
}
}


Thanks,<br />Subhasish
Vinod Kumar Kommineni
Ranch Hand

Joined: Jun 12, 2008
Posts: 54

There is no class named Dates ... its only java.util.Date as modified in above code.


Regards
vinod SCJP 6.0
babul bansal
Greenhorn

Joined: Aug 11, 2007
Posts: 24
Thanks.
Amardeep Salkar
Ranch Hand

Joined: May 22, 2008
Posts: 46
Try This...

public class Dates2 {

public static void main(String[] args) {
java.util.Date d1 = new java.util.Date(1000000000000L);
System.out.println("Ist date: " + d1.toString());
}
}
 
wood burning stoves
 
subject: Error Not Understand!!!
 
Similar Threads
One More to the K&B Errata log...Ch 6 Dates related
Date range
question about ==
Any Alternative for this CODE !!!!!!
Calendar And Date class Doubt