Tips for heathy life

Tips for heathy life

Senin, 25 Agustus 2014

OPERATOR Logic and Boolean AND

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 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