Java Bitwise Or Example


Program
public class BitwiseOrExample{ public static void main(String args[]){ int x=15; int y=25; int z=35; System.out.println(x<y|x<z); //true && true =true System.out.println(x<y|x>z); //true && false =true System.out.println(x>y|x<z); //false && true =true System.out.println(x>y|x>z); //false && false =false }}
Input
Output