How to convert String object to Boolean object?
String
Boolean
Why not use a regular expression ?
public static boolean toBoolean( String target ) { if( target == null ) return false; return target.matches( "(?i:^(1|true|yes|oui|vrai|y)$)" ); }