1. What is the result of the following Java expression?
10 & 6
Ans. 2
2. What will be the output for the following expression?
12 ^ 5
Ans. 9
3. What is the syntax of ternary operator in Java?
Ans. condition? expression1 : expression2;
4. What is the result of the following expression in Java? int x = 10, y = 5;
int z = x > y ? x : y;
System.out.println(z);
Ans. 15.
