Android String to Long Convert parseLong(String s)

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


parse Long


Open Source License


public static Long parseLong(String s) 

Method Source Code

//package com.java2s;

public class Main {
    public static Long parseLong(String s) {
        try {/*from  w w  w.j  a  v  a  2  s . c  o  m*/
            return new Long(s);
        } catch (NumberFormatException e) {
            return null;


  1. parseLong(String string, long defValue)
  2. convertStringToLong(String str, long failValue)
  3. stringToLong(String input)
  4. longsToString(long... longs)
  5. parseCSLongs(String s)
  6. parseLongWithDefault(String s, long defValue)
  7. parseLong(String s, long iDefault)
  8. safeParseLong(String number, long fallback)