Advertisement
DulcetAirman

&=

Jun 20th, 2019
142
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement