• 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

Can't get a date

 
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Luckily I am married...

I pretty much copied the following from the Java tutorial. I have tried
all kinds of imports to no avail. Why will the following not compile?



The compiler gives me the following:

C:\SMLocal\SMLogic>javac DateReporter.java
DateReporter.java:7: cannot find symbol
symbol : class DateFormat
location: class DateReporter
DateFormat dateFormatter;
^
DateReporter.java:13: cannot find symbol
symbol : variable DateFormat
location: class DateReporter
dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, currentLocale);
^
DateReporter.java:13: cannot find symbol
symbol : variable currentLocale
location: class DateReporter
dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, currentLocale);
^
DateReporter.java:13: cannot find symbol
symbol : variable DateFormat
location: class DateReporter
dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT, currentLocale);
^
4 errors
 
Al Wells
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Finally figured it out. Why does that happen after hours of thinking but
only after I post... In any event, here is what I did:



Now to test it.
 
reply
    Bookmark Topic Watch Topic
  • New Topic