| 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()); } }
|
 |
 |
|
|
subject: Error Not Understand!!!
|
|
|