Java Parse Long parseLong(String d)

Here you can find the source of parseLong(String d)

Description

parse Long

License

Apache License

Declaration

public static long parseLong(String d) throws ParseException 

Method Source Code

//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*/
}

Related

  1. parseLong(final String s, final String fmt)
  2. parseLongtoTime(long date)