java.lang
Class Boolean
java.lang.Object
|
+--java.lang.Boolean
- All Implemented Interfaces:
- java.io.Serializable
- public final synchronized class Boolean
- extends Object
- implements java.io.Serializable
TRUE
public static final Boolean TRUE
FALSE
public static final Boolean FALSE
TYPE
public static final Class TYPE
Boolean
public Boolean(boolean)
Boolean
public Boolean(String)
booleanValue
public boolean booleanValue()
valueOf
public static Boolean valueOf(boolean)
valueOf
public static Boolean valueOf(String)
toString
public static String toString(boolean)
toString
public String toString()
- Overrides:
toString
in class Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object)
- Description copied from class:
Object
- Determines if this object is "equal" to another object.
In general, objects should be instances of the same class
with the same guts to be considered equal. For example,
the code below only prints same value since
s
and t
are different strings though
they have the same value: "hello".
String s = new String("hello");
String t = new String("hello");
if (s.equals(t)) System.out.println("same value");
if (s == t) System.out.println("same string");
- Overrides:
equals
in class Object
- Following copied from class:
java.lang.Object
- Parameters:
is
- the other Object to which this one is compared- Returns:
- true if this Object is equal to
other
getBoolean
public static boolean getBoolean(String)