Hello,
Thx again.
The problem with the code below is that format() returns only a String. I need the value in a double data type. When i try to cast into Double(using Double.parseDouble().
It throws no error but it trunates the zero i.e 1234.70 becomes 1234.7
Is there a work around...
Thx for the input. I tried this code sugguested above.
-----------------------------------------------------
double myThreeDecimalsDouble = 1.234;
double myTwoDecimalsDouble = Math.round(myThreeDecimalsDouble*100)/(double)100.00;
----------------------------------------------------
it works...
Hi All,
I have a method that retrieves data from the database. The "Price" column (one of the column it returns) returns a DOUBLE data type. Which means the number could have three numbers AFTER the decimal point. I only want the UI to show a number of a max of TWO decimal points,
Is there...
Hi,
I have a J2EE web applications that uses JSPs for its user interface. Anytime a user clicks on one of the screen buttons, a Microsoft IE pop-up window pops up saying
"Are you sure you want to navigate away from this page. You may have unsubmitted changes. If you leave this page the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.