java:operators
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
java:operators [2021/02/28 16:32] – [Δυαδικοί τελεστές και τελεστές ολίσθησης] gthanos | java:operators [2021/02/28 16:38] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 180: | Line 180: | ||
<code java BitOperatorsDemo.java> | <code java BitOperatorsDemo.java> | ||
class BitOperatorsDemo { | class BitOperatorsDemo { | ||
- | | + | |
- | int bitmask = 0x000F; | + | int bitmask = 0x000F; |
- | int val = 0x4444; | + | int val = 0x4444; |
- | // prints 4 | + | |
- | System.out.println(" | + | |
- | // prints 16 | + | System.out.println(" |
- | System.out.println(" | + | val = val & bitmask; |
- | // prints 2 | + | |
- | System.out.println(" | + | System.out.println(" |
- | // prints | + | // prints 2 |
- | System.out.println(" | + | System.out.println(" |
- | } | + | // prints |
+ | System.out.println(" | ||
+ | } | ||
} | } | ||
</ | </ | ||
- | |||
===== Τελεστές Ανάθεσης ===== | ===== Τελεστές Ανάθεσης ===== | ||
java/operators.1614529932.txt.gz · Last modified: 2021/02/28 16:32 by gthanos