Java Operators MCQ - Multiple Choice Questions And Answers
Q. What is the result of the expression 5 + 3 * 2?
A. 10B. 16
C. 11
D. 13
Q. What is the result of the expression "Hello " + "World"?
A. "Hello"B. "World"
C. "Hello World"
D. Error
Q. What is the result of the expression 9 % 4?
A. 2B. 3
C. 4
D. 1
Q. What is the result of the expression 10 / 3?
A. 3B. 3.33
C. 3.0
D. Error
Q. What is the result of the expression true || false?
A. trueB. false
C. Error
D. None of the above
Q. What is the result of the expression !(5 > 3 && 2 < 4)?
A. trueB. false
C. Error
D. None of the above
Q. What is the result of the expression "Hello" == "Hello"?
A. trueB. false
C. Error
D. None of the above
Q. What is the result of the expression 5 > 3 ? "Yes" : "No"?
A. YesB. No
C. Error
D. None of the above
Q. What is the result of the expression 10 >= 10?
A. trueB. false
C. Error
D. None of the above
Q. What is the result of the expression "apple".equals("Apple")?
A. trueB. false
C. Error
D. None of the above
Q. What is the output of the following code snippet?
int x = 5; int y = 3; System.out.println(x + y * 2);A. 11
B. 23
C. 14
D. 8