Returns the integer value of the system property with the
specified name. The first argument is treated as the name of a
system property. System properties are accessible through the
java.lang.System.getProperty(java.lang.String)
method.
The string value of this property is then interpreted as an
integer value, as per the decode
method,
and an Integer
object representing this value is
returned; in summary:
0x
or the ASCII character #
, not
followed by a minus sign, then the rest of it is parsed as a
hexadecimal integer exactly as by the method
valueOf(java.lang.String, int)
with radix 16.
0
followed by another character, it is parsed as an
octal integer exactly as by the method
valueOf(java.lang.String, int)
with radix 8.
valueOf(java.lang.String, int)
with radix 10.
The second argument is the default value. The default value 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
.
nm | property name. | |
val | default value. |
Integer
value of the property.
SecurityException | for the same reasons as
System.getProperty |
System.getProperty(java.lang.String), System.getProperty(java.lang.String, java.lang.String)
Diagram: Number