Java java.lang Boolean equals(Object obj)
Description Of Boolean: equals(Object obj)
The java.lang.Boolean.equals(Object obj) returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.
Boolean.equals(Object obj) method returns true if the Boolean objects represent the same value, false otherwise.
Code Example Java Boolean
public class BooleanExam {
public static void main(String[] args) {
Boolean x = new Boolean(true);
Boolean y = new Boolean(false);
boolean a = x.equals(y);
System.out.println(a);
}
}
ไม่มีความคิดเห็น :
แสดงความคิดเห็น