Java java.lang Boolean booleanValue()
Description Of Boolean: booleanValue()
The java.lang.Boolean.booleanValue() returns the value of this Boolean object as a boolean primitive
Boolean.booleanValue() method returns the primitive boolean value of this object.
Code Example Java Boolean
public class BooleanExam {
public static void main(String[] args) {
Boolean a = new Boolean(true);
Boolean b = new Boolean(false);
boolean aBool = a.booleanValue();
boolean bBool = b.booleanValue();
System.out.println(aBool);
System.out.println(bBool);
}
}
ไม่มีความคิดเห็น :
แสดงความคิดเห็น