Java tutorial
//package com.java2s; //License from project: Apache License public class Main { public static Boolean stringToBoolean(String str) { Boolean rst = null; try { rst = Boolean.parseBoolean(str); } catch (Exception e) { // do nothing } return rst; } }