[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.newcomer] How to use String.format ("format",....)
|
- From: lbriones@xxxxxxxxxx (Leandro Briones)
- Date: Tue, 21 Mar 2006 18:58:50 +0000 (UTC)
- Newsgroups: eclipse.newcomer
- Organization: Eclipse
- User-agent: NewsPortal/0.36 (http://florian-amrhein.de/newsportal)
I am using Eclipse 3.1.2 and trying out the exercises from "Java How To
Program" book by Deitel....
Exercise Fig 8.1 ... excerpt
// convert to String in universal-time format (HH:MM:SS)
public String toUniversalString()
{
return String.format( "%02d:%02d:%02d", hour, minute, second );
} // end method toUniversalString
For some reason, the "return String.format ..." is not liked by/in
Eclipse ..... any hints (I attempted to find out suing the cntl spacebar
on how I can overcome it?
Any hints are welcome