Multiple choice general knowledge history

public class Question{ public static void main(String args[]) { int i=3,j=2; System.out.print("i|j="+ (i|j)); } }

  1. i | j = 3

  2. i | j = 2

  3. Compile Time Error

  4. None

Reveal answer Fill a bubble to check yourself
A Correct answer
Explanation

The bitwise OR operator (|) compares each bit position and returns 1 if either operand has a 1 at that position. Binary 3 is 011 and binary 2 is 010, so 3|2 = 011|010 = 011 = 3.