~ : Java Glossary


Tilde ~ performs a bit-wise logical, one’s complement negation, usually on an int. Every zero bit becomes 1 and every 1 bit becomes 0.

~ 0b1110_00000b0001_1111

For operations on boolean use the ! operator instead.

This page is posted
on the web at:


Optional Replicator mirror
of mindprod.com
on local hard disk J:

Canadian Mind Products
Please the feedback from other visitors, or your own feedback about the site.
Contact Roedy. Please feel free to link to this page without explicit permission.

Your face IP:[]
You are visitor number