容易误用的 Boolean.getBoolean
getBoolean
public static boolean getBoolean(String name)
- Returns
trueif and only if the system property named by the argument exists and is equal to the string"true". (Beginning with version 1.0.2 of the JavaTM platform, the test of this string is case insensitive.) A system property is accessible throughgetProperty, a method defined by theSystemclass.If there is no property with the specified name, or if the specified name is empty or null, then
falseis returned. - Parameters:
name- the system property name.- Returns:
- the
booleanvalue of the system property. - See Also:
System.getProperty(java.lang.String),System.getProperty(java.lang.String, java.lang.String)
浙公网安备 33010602011771号