Java Operators : |= bitwise OR and assign example [duplicate]
I presume matches is a boolean; this means that the bitwise operators behave the same as logical operators. On each iteration of the loop, it ORs the current value of matches with whatever is returned from field.contains(). This has the effect of setting it to true if it was already true, or if field.contains() returns true.
IMAGES
COMMENTS
I presume matches is a boolean; this means that the bitwise operators behave the same as logical operators. On each iteration of the loop, it ORs the current value of matches with whatever is returned from field.contains(). This has the effect of setting it to true if it was already true, or if field.contains() returns true.