20.7
java.lang.Integer
THE PACKAGE JAVA.LANG
In other words, this method returns an
Integer
 object equal to the value of:
getInteger(nm, new Integer(val))
but in practice it may be implemented in a manner such as:
Integer result = getInteger(nm, null);
return (result == null) ? new Integer(val) : result;
to avoid the unnecessary allocation of an
Integer
 object when the default value is
not needed.
20.7.23
public static Integer getInteger(String nm, Integer val)
The first argument is treated as the name of a system property to be obtained as if
by the method
System.getProperty
 ( 20.18.9). The string value of this prop 
erty is then interpreted as an integer value and an
Integer
 object representing this
value is returned.
If the property value begins with the two ASCII characters
0x
 or the ASCII
character
#
, not followed by a minus sign, then the rest of it is parsed as a
hexadecimal integer exactly as for the method
Integer.valueOf
 ( 20.7.20)
with radix
16
.
If the property value begins with the ASCII character
0
 followed by another
character, it is parsed as an octal integer exactly as for the method
Inte 
ger.valueOf
 ( 20.7.20) with radix
8
.
Otherwise, the property value is parsed as a decimal integer exactly as for the
method
Integer.valueOf
 ( 20.7.20) with radix
10
.
The second argument serves as a default value. If there is no property of the
specified name, or if the property does not have the correct numeric format, then
the second argument is returned.
494






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

java hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved