Here you can find the source of tryParseBool(String value)
public static boolean tryParseBool(String value)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean tryParseBool(String value) { try {/* w w w .j a v a 2 s.c o m*/ Boolean.parseBoolean(value); return true; } catch (Exception e) { return false; } } }