String转Double:
Double.parseDouble()
Double转String:
Double.toString( )
设置保留多少位小数:
DecimalFormat df = new DecimalFormat("0.000000");//保留6位小数
Double.toString(Double.valueOf(df.format(1000/3)));
String转Double:
Double.parseDouble()
Double转String:
Double.toString( )
设置保留多少位小数:
DecimalFormat df = new DecimalFormat("0.000000");//保留6位小数
Double.toString(Double.valueOf(df.format(1000/3)));