Forums Register Login

Trim in java

+Pie Number of slices to send: Send
Hello,
I am getting a result from java file which is of type double.When displaying this number through jsp file i want only 2 digits to appear after decimal point.
Pls help
+Pie Number of slices to send: Send
Hi,
You can use the method setMaximumFractionDigit() in java.text.NumberFormat to manipulate the format of the number.
Benny T
+Pie Number of slices to send: Send
This really has nothing to do with JSPs, so I'm moving it along to Java In General (Beginner).
bear
+Pie Number of slices to send: Send
Can anyone tell me exactly how to do this?
+Pie Number of slices to send: Send
Check the API docs for DecimalFormat and NumberFormat
Can you shoot lasers out of your eyes? Don't look at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 1264 times.
Similar Threads
Ant error: Make sure you have it in you classpath
CD Rom auto run
JSP and Java wait help
CD Rom auto run
create tables using java code by fetching from .sql file
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 15, 2024 22:32:21.