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