I want to share about OPERATOR Logic and Boolean AND. You can use this code but if you copy this code and
paste in your blog/website, please insert this link of article.
------------------------
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