• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error Not Understand!!!

 
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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());
}
}
 
Ranch Hand
Posts: 54
Firefox Browser
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There is no class named Dates ... its only java.util.Date as modified in above code.
 
babul bansal
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks.
 
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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());
}
}
reply
    Bookmark Topic Watch Topic
  • New Topic