Java examples for java.util:Properties File
get Boolean from Properties
//package com.java2s; import java.util.Properties; public class Main { /**// w ww . j a va2 s. c o m * @param prop The Properties set * @param key the key used to store this property * @param def a default in case the property cannot be retrieved */ public static boolean getBoolean(Properties prop, final String key, final boolean def) { final String value = prop.getProperty(key); return value == null ? def : value.equalsIgnoreCase("true"); } }