code: public static Integer getInteger(String nm, int val) {
          Integer result = getInteger(nm, null);
          return (result == null) ? Integer.valueOf(val) : result;
      }
docs: Determines the integer 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 an integer
  value using the grammar supported by {@link Integer#decode decode} and
  an {@code Integer} object representing this value is returned.
  
  <p>The second argument is the default value. An {@code Integer} 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
  {@code null}.
  
  <p>In other words, this method returns an {@code Integer} object
  equal to the value of:
  
  <blockquote>
  {@code getInteger(nm, new Integer(val))}
  </blockquote>
  
  but in practice it may be implemented in a manner such as:
  
  <blockquote><pre>
  Integer result = getInteger(nm, null);
  return (result == null) ? new Integer(val) : result;
  </pre></blockquote>
  
  to avoid the unnecessary allocation of an {@code Integer}
  object when the default value is not needed.
  
  @param   nm   property name.
  @param   val   default value.
  @return  the {@code Integer} 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)