Convert string To Double via bigdecimal - Android java.lang

Android examples for java.lang:Double

Description

Convert string To Double via bigdecimal

Demo Code

import java.math.BigDecimal;

public class Main {

  public static double strToDouble(String str) {

    BigDecimal bDeci = new BigDecimal(str);

    return bDeci.doubleValue();
  }//from w w  w. ja va  2 s .  c  o  m

}

Related Tutorials