This is logic Operator exclusive OR. You can use this code but if you copy this code and
paste in your blog/website, please insert this link of article.
------------------------
boolean val1 = true;
boolean val2 = true;
System.out.println(val1 ^ val2);
val1 = false;
val2 = true;
System.out.println(val1 ^ val2);
val1 = false;
val2 = false;
System.out.println(val1 ^ val2);
val1 = true;
val2 = false;
System.out.println(val1 ^ val2);
0 komentar:
Posting Komentar