Forums Register Login

Error Not Understand!!!

+Pie Number of slices to send: Send
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?
+Pie Number of slices to send: Send
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());
}
}
+Pie Number of slices to send: Send
There is no class named Dates ... its only java.util.Date as modified in above code.
+Pie Number of slices to send: Send
Thanks.
+Pie Number of slices to send: Send
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());
}
}
You ought to ventilate your mind and let the cobwebs out of it. Use this cup to catch the tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1182 times.
Similar Threads
Any Alternative for this CODE !!!!!!
Date range
Calendar And Date class Doubt
question about ==
One More to the K&B Errata log...Ch 6 Dates related
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 18, 2024 23:03:00.