Skip to Main Content
Java
book

Java

by Michael Sikora
January 2003
Beginner to intermediate content levelBeginner to intermediate
150 pages
7h 28m
English
Morgan Kaufmann
Content preview from Java
28
Chapter 3: Flow Control
[]
Table 3.2:
Bitwise binary operations.
Operation Result
a 00000011
b 00000010
a & b 00000010
a I b 00000011
a ^ b 00000001
II
Divide by 0 avoided
java.lang.AmithmeticException' / by zero
void TestLogicals .main(java. lang. String[ ] )
Exception in thread main
Note that the first ^ condition is false since both (a > b) and (c < d) are true.
3.2.1 Bitwise Operators
The bitwise operators,
&
(bitwise and),
I
(bitwise or), ^ (bitwise exclusive or), and ~ (bitwise
complement) are used to manipulate the bits of the Java integral types. The operators act
similarly to the equivalent ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JAVA Programming

JAVA Programming

K. Rajkumar
Java Programming

Java Programming

Hari Mohan Pandey
Java Programming

Java Programming

Poornachandra Sarang
Java 9 for Programmers

Java 9 for Programmers

Paul J. Deitel, Harvey Deitel

Publisher Resources

ISBN: 9781558609099