Convert String to Boolean value - Android java.lang

Android examples for java.lang:String Convert

Description

Convert String to Boolean value

Demo Code


public class Main{

    public static boolean toBool(String b) {
        try {//from   w ww. ja  v  a  2 s .  c o m
            return Boolean.parseBoolean(b);
        } catch (Exception e) {
        }
        return false;
    }

}

Related Tutorials