public static long parseLong(String text){
  try {
    return Long.parseLong(text);
  }
 catch (  NumberFormatException e) {
    return 0;
  }
}

public static long parseLong ( String text ) { try { return Long . parseLong ( text ) ; } catch ( NumberFormatException e ) { return 0 ; } }
parse long value from a string , if null or exception , return 0
