To check a System property has a value true or not we can use the Boolean wrapper class.
public class BooleanWrapper {
public static void main(String[] args) {
boolean bool = Boolean.getBoolean("os.name");
System.out.println(bool);
}
}
This would return true only if the System property exist and has a value equal to true. All other cases this would return false.




















