Answers for "operator |= java"

0

|= java operation

foo = 32;   // 32 =      0b00100000
bar = 9;    //  9 =      0b00001001
baz = 10;   // 10 =      0b00001010
foo |= bar; // 32 | 9  = 0b00101001 = 41
            // now foo = 41
foo |= baz; // 41 | 10 = 0b00101011 = 43
            // now foo = 43
Posted by: Guest on May-25-2021
0

java :: operator

// :: is a new operator included in Java 8 that is used to
// refer a method of an existing class. Comes in useful when using optionals:
Optional<Soundcard> soundcard = ...;
soundcard.ifPresent(System.out::println);
Posted by: Guest on November-05-2021

Browse Popular Code Answers by Language