This is LOGIC OPERATOR and BOOLEAN OR. You can use this code but if you copy this code and
paste in your blog/website, please insert this link of article.
--------------------------int i = 0;
int j = 10;
boolean test= false;
//demonstrasi ||
test = (i < 10) || (j++ > 9);
System.out.println(i);
System.out.println(j);
System.out.println(test);
//demonstrasi |
test = (i < 10) | (j++ > 9);
System.out.println(i);
System.out.println(j);
System.out.println(test);
0 komentar:
Posting Komentar