String format in java? -
Input String: 115.0000
Output must be like string: 115.00
I used this code:
string. Format ("% .2f", "115.0000");
I found illegal subdivision exceptions
. what can I do now?
You are submitting a string, but it is a floating point value. Remove the quotes around the number (the second parameter).
Comments
Post a Comment