Java tutorial
//package com.java2s; public class Main { public static boolean getBool(String str, boolean b) { return null != str && str.equalsIgnoreCase("true") ? true : false; } }