Well, I tryed BigDecimal but it gives an error ;

Can't convert double to java.math.BigInteger ;

my code is :

new BigDecimal (sliceVal[j],2)  -->sliceVal[j] is a double value here...

What shoul I do?

thanks

FIRAT
----- Original Message -----
From: "Nicholas Larsson" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 26, 2001 12:07 PM
Subject: SV: rounding values


> Use the BigDecimal Class in the java.math package.
>
> /nico
>
>
> -----Ursprungligt meddelande-----
> Fr�n: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]F�r Firat Tiryaki
> Skickat: den 26 maj 2001 09:38
> Till: [EMAIL PROTECTED]
> �mne: rounding values
>
>
> Hi all,
>
> How can I round values decimally ;
>
> example:   I want to round the value 78.2145 to 78.21  or 78.2175 to 78.22
> is there a method for this or do I have to write my own
>
> thanks in advanced
>
> FIRAT
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
>
___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to