Example below demonstrates working of bigdecimal
class valueOf method. Method returns bigdecimal
values. Method converts the long values in to bigdecimal
value. Method returns a static bigdecimal object.
Syntax for using the method: static BigDecimal longValue(long ln)
Suppose we have bigdecimal objects x & y & the long variable z;
then y = x.valueOf(z);
System.out.println(y);
Java_bigdecimal_valueOf_long.java
import java.math.BigDecimal;
|
|
Recommend the tutorial |
Ask Questions? Discuss: Java bigdecimal valueOf long example
Post your Comment