Java tutorial
//package com.java2s; public class Main { public static Boolean getBoolean(String val) { try { return Boolean.parseBoolean(val); } catch (Exception e) { } return null; } }