import java.io.UnsupportedEncodingException;
import java.math.BigDecimal;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* 去除字符串末尾的0
* @param number
*/
public static void getNumber(String number){
/**
* 可直接用于字符串
* 不能用于int
*/
// Double.parseDouble(number);//转换类型:String > Double
// number=BigDecimal.valueOf(Double.parseDouble(number)).stripTrailingZeros().toPlainString();
// System.out.println(number);
int flag=0;
if(number.indexOf(".")<0) {
flag=1;
}
int i=number.length()-1;
for(;i>=0;i--){
if(number.charAt(i)!='0')
break;
}
if(number.charAt(i)=='.')
flag=1;
if(flag==1){
System.out.println(Integer.parseInt(new BigDecimal(number).stripTrailingZeros().toPlainString()));
}else{
System.out.println(Double.parseDouble(new BigDecimal(number.substring(0,i+1)).stripTrailingZeros().toPlainString()));
}
}