Java Long Number Create toLong(String param)

Here you can find the source of toLong(String param)

Description

Convert to Long

License

LGPL

Parameter

Parameter Description
param a parameter

Declaration

public static long toLong(String param) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

public class Main {
    /**/* ww  w.  j a  va 2  s  .  c  o m*/
     * 
     * <p>
     * Convert to Long
     * </p>
     * 
     * @param param
     * @return
     */
    public static long toLong(String param) {

        try {
            return Long.valueOf(param.trim());
        } catch (Exception e) {
            return 0;
        }
    }
}

Related

  1. toLong(Object value, long defaultValue)
  2. toLong(Object x)
  3. toLong(short[] arr)
  4. toLong(String input, int radix, long defaultValue)
  5. toLong(String numeric)
  6. toLong(String parameter)
  7. toLong(String s)
  8. toLong(String s)
  9. toLong(String s)