Java tutorial
//package com.java2s; //License from project: Apache License public class Main { public static long toLong(String obj) { try { return Long.parseLong(obj); } catch (Exception e) { e.printStackTrace(); } return 0; } }