Here you can find the source of toBoolean(String inString)
public static boolean toBoolean(String inString)
//package com.java2s; /*L//from w ww. j a va2s .c o m * Copyright Oracle inc, SAIC-F * * Distributed under the OSI-approved BSD 3-Clause License. * See http://ncip.github.com/cadsr-util/LICENSE.txt for details. */ public class Main { public static boolean toBoolean(String inString) { boolean retVal = false; if (inString.toUpperCase().equals("Y") || inString.toUpperCase().equals("TRUE") || inString.equalsIgnoreCase("Yes")) { retVal = true; } else if (inString.toUpperCase().equals("N") || inString.toUpperCase().equals("FALSE") || inString.equalsIgnoreCase("No")) { retVal = false; } return retVal; } }