Here you can find the source of toLong(String param)
Convert to Long
Parameter | Description |
---|---|
param | a parameter |
public static long toLong(String param)
//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; } } }