Skip to main content



      Home
Home » Newcomers » Newcomers » How to use String.format ("format",....)
How to use String.format ("format",....) [message #144277] Tue, 21 March 2006 13:58 Go to next message
Eclipse UserFriend
Originally posted by: lbriones.san.rr.com

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
Re: How to use String.format ("format",....) [message #144287 is a reply to message #144277] Tue, 21 March 2006 14:04 Go to previous message
Eclipse UserFriend
Originally posted by: lbriones.san.rr.com

Sorry ...

A response had been posted already ....

"You have to make sure your project is using a Java 5.0 JRE, and that the
compiler compliance settings are set to Java 5.0. Go to
Window->Preferences->Java->Compiler and change the Compiler compliance
level combo to 5.0.

Hope this helps,"

Yes, Jeff - this worked...

Thanks a million
Previous Topic:Eclipse sdk on Citrix
Next Topic:Can't use visual editor after installation
Goto Forum:
  


Current Time: Tue Jul 22 00:54:26 EDT 2025

Powered by FUDForum. Page generated in 0.34473 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top