This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Java Micro Edition and the fly likes Using and manipulating float/Double values in J2Me Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Mobile » Java Micro Edition
Bookmark "Using and manipulating float/Double values in J2Me" Watch "Using and manipulating float/Double values in J2Me" New topic
Author

Using and manipulating float/Double values in J2Me

Anand Natraj
Ranch Hand

Joined: May 17, 2004
Posts: 53
Hi friends,
I am a begineer in J2ME. Can any one tell me how to handle and manipilate float/double values in J2ME
Marc Peabody
pie sneak
Sheriff

Joined: Feb 05, 2003
Posts: 4727

Good question. I'm a beginner as well but here's what I know.

floats were left out on j2me. Including them will cause the code to not compile.
If you needed it for money values and it is very simple, you can use two integers, one for dollars and one for cents (or whatever currency is desired).

There are libraries out there that will provide float handling:
http://www.dclausen.net/projects/microfloat/
http://gridbug.ods.org/Real.html
http://henson.newmail.ru/j2me/FloatConv.htm


A good workman is known by his tools.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Using and manipulating float/Double values in J2Me
 
Similar Threads
general declaration
Using floats PRoblem
Trig functions
why won't "float x = 1.0;" compile
Can anyone tell the result of this code.