[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] How to use String.format ("format",....)

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