Professional Documents
Culture Documents
Operator CAH
Operator CAH
2. Output : Boolean.
Logical Operator
1. Operan : Boolean.
2. Output : Boolean.
3. Jenis
a. && (logical AND)
b. & (boolean logical AND)
c. || (logical OR)
d. | (boolean logical inclusive OR)
e. ^ (boolean logical exclusive OR)
f. ! (logical NOT)
Tabel Kebenaran
AND True False OR True False
True True False True True True
False False False False True False
Contoh :
◦ Alur resep masakan
◦ Alur prosedur operasi
◦ Alur prosedur registrasi
◦ Alur program juga sama….
Dry Run
Melakukan proses debug terhadap alur program.
C = B + A; 3 10 12 10
4 12 12 10
System.out.println(A);
5 12 12 24
B=input.nextIn()// input 4
6 12 12 24
7 12 4 24
Daftar Pustaka
1. Cormen, T. H., Leiserson, C. E., Rivest, R. L., & Stein, C. (2009). Introduction to Algorithms Third
Edition. Cambridge: The MIT Press.
2. Sedgewick, R. (2002). Algorithm in Java: parts 1-4 Third Edition. Boston: Pearson Education, Inc.
3. P. Deitel and H. Deitel, Java How To Program 9th Edition, Prentice Hall, 2011.
4. Poo, Danny, Derek Kiong, and Swarnalatha Ashok. Object-Oriented Programming and Java, 2nd
Edition. Springer, 2010.