Java Boolean Parse tryParseBool(String value)

Here you can find the source of tryParseBool(String value)

Description

try Parse Bool

License

Open Source License

Declaration

public static boolean tryParseBool(String value) 

Method Source Code

//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;
        }
    }
}

Related

  1. tryParseBool(Object obj, Boolean defaultVal)
  2. tryParseBoolean(String value)
  3. tryParseBoolean(String value)