Example usage for java.lang Boolean Boolean

List of usage examples for java.lang Boolean Boolean

Introduction

In this page you can find the example usage for java.lang Boolean Boolean.

Prototype

@Deprecated(since = "9")
public Boolean(String s) 

Source Link

Document

Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true" .

Usage

From source file:Main.java

public static void main(String[] args) {
    Boolean boolean1 = new Boolean("true");
    System.out.println(boolean1);

}

From source file:Main.java

public static void main(String[] args) {
    Boolean b1 = new Boolean(true);
    Boolean b2 = new Boolean(false);

    boolean res = b1.equals(b2);

    System.out.println("b1:" + b1 + " and b2:" + b2 + " are equal is " + res);
}

From source file:Main.java

public static void main(String[] args) {
    Boolean boolean1 = new Boolean("true");
    System.out.println(boolean1.booleanValue());

}

From source file:Main.java

public static void main(String[] args) {
    Boolean blnObj = new Boolean("true");
    boolean b = blnObj.booleanValue();
    System.out.println(b);/*  ww  w  .  j  av  a 2 s.  c o  m*/
}

From source file:Main.java

public static void main(String[] args) {

    Boolean boolean2 = new Boolean(true);
    System.out.println(boolean2);
}

From source file:Main.java

public static void main(String[] args) {
    Boolean boolean1 = new Boolean("true");
    System.out.println(boolean1);

    Boolean boolean2 = new Boolean(true);
    System.out.println(boolean2.compareTo(boolean1));
}

From source file:Main.java

public static void main(String[] args) {
    Boolean b1 = new Boolean(true);
    Boolean b2 = new Boolean(false);

    int i1 = b1.hashCode();
    int i2 = b2.hashCode();

    System.out.println("Hash code of " + b1 + " is " + i1);
    System.out.println("Hash code of " + b2 + " is " + i2);
}

From source file:Main.java

public static void main(String[] args) {

    Boolean boolean1 = new Boolean("true");
    System.out.println(boolean1.toString());

}

From source file:MainClass.java

public static void main(String[] args) {
    Boolean b1 = new Boolean(false);
    Boolean b2 = new Boolean("true");

    System.out.println(b1.booleanValue());
    System.out.println(b2.booleanValue());
}

From source file:Main.java

public static void main(String args[]) {
    Boolean b1 = new Boolean("TRUE");
    Boolean b2 = new Boolean("FALSE");
    System.out.println(b1.toString() + " or " + b2.toString());
    for (int j = 0; j < 16; ++j)
        System.out.print(Character.forDigit(j, 16));

    Integer i = new Integer(Integer.parseInt("ef", 16));
    Long l = new Long(Long.parseLong("abcd", 16));
    long m = l.longValue() * i.longValue();
    System.out.println(Long.toString(m, 8));

}