code: public static Long getLong(String nm, long val) {
          Long result = Long.getLong(nm, null);
          return (result == null) ? Long.valueOf(val) : result;
      }
docs: Determines the {@code long} value of the system property
  with the specified name.
  
  <p>The first argument is treated as the name of a system
  property.  System properties are accessible through the {@link
  java.lang.System#getProperty(java.lang.String)} method. The
  string value of this property is then interpreted as a {@code
  long} value using the grammar supported by {@link Long#decode decode}
  and a {@code Long} object representing this value is returned.
  
  <p>The second argument is the default value. A {@code Long} object
  that represents the value of the second argument is returned if there
  is no property of the specified name, if the property does not have
  the correct numeric format, or if the specified name is empty or null.
  
  <p>In other words, this method returns a {@code Long} object equal
  to the value of:
  
  <blockquote>
  {@code getLong(nm, new Long(val))}
  </blockquote>
  
  but in practice it may be implemented in a manner such as:
  
  <blockquote><pre>
  Long result = getLong(nm, null);
  return (result == null) ? new Long(val) : result;
  </pre></blockquote>
  
  to avoid the unnecessary allocation of a {@code Long} object when
  the default value is not needed.
  
  @param   nm    property name.
  @param   val   default value.
  @return  the {@code Long} value of the property.
  @throws  SecurityException for the same reasons as
  {@link System#getProperty(String) System.getProperty}
  @see     java.lang.System#getProperty(java.lang.String)
  @see     java.lang.System#getProperty(java.lang.String, java.lang.String)