Hello everybody.
Can anyone explain what are
public static Integer getInteger(
String nm)
public static Integer getInteger(String nm, int val) for?
In
Java 2 SDK, Standard Edition Documentation I have read this:
getInteger determines the integer value of the system property with the specified name.
If there is no property with the specified name, if the specified name is empty or null, or if the property does not have the correct numeric format, then null is returned.
I have tested on my computer (OS -Windows 98) this program:
import java.util.*;
class
Test {
public static void main(String[] args) {
Properties prop = new Properties();
prop = System.getProperties();
for(Enumeration enum = prop.propertyNames(); enum.hasMoreElements(); ) {
System.out.println(Integer.getInteger((String)enum.nextElement()));
}
}
}
The result was a list of null-s.
So if all integer value of the system property are null what are getInteger for?
Thank you very much. :roll:
[ October 02, 2002: Message edited by: ArthurClarke ]
[ October 02, 2002: Message edited by: ArthurClarke ]
[ October 02, 2002: Message edited by: Arthur Clarke ]
[ October 02, 2002: Message edited by: Arthur Clarke ]