Here you can find the source of parseLong(String d)
public static long parseLong(String d) throws ParseException
//package com.java2s; //License from project: Apache License import java.text.DecimalFormat; import java.text.ParseException; public class Main { public static long parseLong(String d) throws ParseException { DecimalFormat format = new DecimalFormat("#.##"); return format.parse(d.toUpperCase().replace("+", "")).longValue(); }/* w w w .j a v a 2 s . c o m*/ }