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 operation i|j compares each bit of i (binary 11 = decimal 3) and j (binary 10 = decimal 2). Bitwise OR produces 1 if at least one operand has a 1 in that position. So: 11 | 10 = 11 (binary) which equals 3 in decimal. The output is i|j=3.