Android String to Boolean Convert toBool(String str)

Here you can find the source of toBool(String str)

Description

to Bool

Declaration

public static boolean toBool(String str) 

Method Source Code

//package com.java2s;

public class Main {

    public static boolean toBool(String str) {
        try {/*w w  w  .  j  a v a2  s  .com*/
            return Boolean.parseBoolean(str);
        } catch (Exception e) {
        }
        return false;
    }
}

Related

  1. getValueOrDefault(String s, String s1)
  2. toBoolean(final String value)
  3. getBool(String str, boolean b)
  4. toBool(String b)
  5. getBooleanValue(String string)