Get system property in boolean value

ReturnMethodSummary
static booleangetBoolean(String name)Gets system property.

public class Main {

  public static void main(String[] args) {
    System.setProperty("myKey", "true");
    Boolean boolean1 = Boolean.getBoolean("myKey");
    System.out.println(boolean1);

  }
}

The output:


true
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.