Here you can find the source of toBool(String str)
public static boolean toBool(String str)
//package com.java2s; public class Main { public static boolean toBool(String str) { try {/*w w w . j a v a2 s .com*/ return Boolean.parseBoolean(str); } catch (Exception e) { } return false; } }