--- Begin Message ---
Its always better to use Float object while handling price related fields...
 
Regards
Kathir.

________________________________

From: Murray Collingwood [mailto:[EMAIL PROTECTED]
Sent: Fri 9/9/2005 12:44 PM
To: user@struts.apache.org
Subject: A nice easy question



Hi all

I put a price field (float) in a form (textbox) but had some trouble parsing 
the text using
the DemicalFormat class (it doesn't seem to like the 'float' type).  So I went 
through
changing my field to 'int' but now of course I can only store whole dollar 
amounts.

To save me lots of time, should I:

a) use long
b) use double
c) go back to float and fix my parsing
d) use int and store the value as cents (rather than dollars) (n*100 and n/100)

Kind regards
mc


FOCUS Computing
Mob: 0415 24 26 24
[EMAIL PROTECTED]
http://www.focus-computing.com.au



--
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.10.19/93 - Release Date: 8/09/2005


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



<<winmail.dat>>


--- End Message ---
This e-mail and any files transmitted with it are for the sole use of the 
intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply 
e-mail and destroy all copies of the original message. 
Any unauthorised review, use, disclosure, dissemination, forwarding, printing 
or copying of this email or any action taken in reliance on this e-mail is 
strictly 
prohibited and may be unlawful.

  Visit us at http://www.cognizant.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to