Advertisement
DulcetAirman

&=

Jun 20th, 2019
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.27 KB | None | 0 0
  1. public class SomeClass {
  2.  
  3.     public static void main(String[] args) {
  4.         boolean x = false;
  5.         x &= wahr();
  6.         // equal to:
  7.         // x = (boolean)(x & wahr());
  8.         System.out.println(x);
  9.     }
  10.    
  11.     static boolean wahr() {
  12.         System.out.println("wahr!");
  13.         return true;
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement