View Single Post
  #1 (permalink)  
Old 06-07-2008, 01:18 PM
coolsig coolsig is offline
Member
 
Join Date: Jun 2008
Posts: 2
coolsig is on a distinguished road
convert a really big string (len 39) to bigdecimal
Hi ,
How do I convert a large String (length 39 ) to BigDecimal ?

eg
String c = "848595950484765868574748349586738596879";

try {
BigDecimal num2 = BigDecimal.valueOf((Long.parseLong(c)));
} catch (NumberFormatException nfe) {
nfe.printStackTrace();
}

I tried this, it throws a nfe. Any ideas on how to get this string parsed to an BigDecimal.

Thanks
Reply With Quote
Sponsored Links