Java tutorial
//package com.java2s; //License from project: LGPL import java.util.Properties; public class Main { public static boolean getBooleanProperty(Properties properties, String key, boolean defaultValue) { if (properties != null) { String value = properties.getProperty(key, "").trim().toLowerCase(); if (!value.equals("")) { return Boolean.parseBoolean(value); } } return defaultValue; } }