private static int parseInt(String str,int defaultValue){
  if (str == null)   return defaultValue;
  return Integer.parseInt(str);
}

private static int parseInt ( String str , int defaultValue ) { if ( str == null ) return defaultValue ; return Integer . parseInt ( str ) ; }
parse the given string as an integer , returning the provided default value if the string is null .
