Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
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
Forum:
Beginning Java
Date class
Spandan Pandey
Greenhorn
Posts: 10
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
public class TestFormats { public static void main(String[ ] args) { String s = String. format("%tr", new Date( ) ); System.out.println(s); } }
Output:-
TestFormats.java:4: cannot find symbol
symbol: class Date
location: class TestFormats
String
s = String.format("%tr", new Date( ) );
1 error
Please Help!!!
Bear Bibeault
Sheriff
Posts: 67746
173
I like...
posted 10 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Have you imported the Date class?
[
Asking smart questions
] [
About Bear
] [
Books by Bear
]
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
System.out.format method
Pass by ref- pgm err
formatting
Output of time
Formatting decimals
More...