|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Converting String to Float
Dear Sir,
I am totally stuck with converting String to float value. I need following output. Ex : Input (String) : "123.450" Output (float) : 123.450 I am using Float.parseFloat(String) function but this way I am losing '0's at end of String. I don't want to loss zero's from String. I am appreciating everbody who will read this forum and who will be reply and give me the solution of this problem. Regards, Sandip Prajapati |
|
#2
|
||||
|
||||
|
I'd try to read the string value and the use the valueOf() method of the Float class. This perhaps can give another result.
|
|
#3
|
|||
|
|||
|
like this?
PHP Code:
if not, sorry... |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Java Development > Converting String to Float |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|