parse Long value from String - Android java.lang

Android examples for java.lang:Math

Description

parse Long value from String

Demo Code


//package com.java2s;

public class Main {
    public static Long parseLong(String value) {
        Long parseValue = null;/*from w  w  w .j a  va 2s.  c  o m*/
        try {
            parseValue = Long.parseLong(value);
        } catch (Exception e) {
            //ignored
            parseValue = null;
        }
        return parseValue;
    }
}

Related Tutorials