Wednesday, 04/03/2026, 15:02:59 | RSS | Welcome Guest

BERBAGI
Indahnya Berbagi 
Main
Site menu
Section categories
dasar java [11]
pemrograman java
Java Script [3]
Pascal [8]
Dasar pemrograman
Our poll
Rate my site
Total of answers: 2
Login form

Statistics

Total online: 1
Guests: 1
Users: 0


Main » Articles » dasar java

Java Boolean Operators
boolean logical operators di java : | , & , ^ , ! , || , && , == , != .
java memiliki tipe data primitive yang disebut boolean yang dimana hanya memiliki nilai benar dan salah

A         B             A|B       A&B      A^B      !A
false     false         false     false    false    true
true      false         true      false    true     false
false     true          true      false    true     true
true      true          true      true     false    false

| the OR operator
& the AND operator
^ the XOR operator
! the NOT operator
|| the short-circuit OR operator
&& the short-circuit AND operator
== the EQUAL TO operator
!= the NOT EQUAL TO operator 

contoh :


output : 


Category: dasar java | Added by: redmond (07/08/2012)
Views: 594 | Rating: 0.0/0
Total comments: 0
Name *:
Email *:
Code *: