Here you can find the source of String2AmountFloat(String str)
public static double String2AmountFloat(String str)
//package com.java2s; import java.text.NumberFormat; public class Main { public static double String2AmountFloat(String str) { try {//from w w w.j a v a2 s . c o m String tempStr = NumberFormat.getNumberInstance() .format(Long.parseLong(str, 10)).replace(",", ""); return Long.parseLong(tempStr) / 100.00; } catch (Exception e) { e.printStackTrace(); return 0.00; } } }