bigdecimal to string conversion in java code example
Example 1: bigdecimal to string
BigDecimal bigDecimal = new BigDecimal("10.0001");
String bigDecimalString = String.valueOf(bigDecimal.doubleValue());
System.out.println("bigDecimal value in String: "+bigDecimalString);
Example 2: convert biginteger to string java
// create 2 String objects
String s1, s2;
bi1 = new BigInteger("1234");
bi2 = new BigInteger("-1234");
// assign String value of bi1, bi2 to s1, s2
s1 = bi1.toString();
s2 = bi2.toString();