Which operator checks if two values are equal in Java?
a) ==
b) =
c) !=
d) ===
What does the operator '!=' signify in Java?
a) Greater than
b) Less than
c) Not equal to
d) Equal to
Which operator is used to check if one value is greater than another in Java?
a) >
b) >=
c) <
d) <=
What is the result of the expression: 7 < 5 in Java?
a) true
b) false
c) 2
d) Compilation error
Which operator checks if one value is less than or equal to another in Java?
a) >=
b) <=
c) !=
d) ==
What is the outcome of the expression: 10 >= 10 in Java?
a) true
b) false
c) 0
d) Compilation error
Which operator checks for inequality without considering data types in Java?
a) !=
b) !==
c) ===
d) ><
What does the '==' operator evaluate to when comparing two objects in Java?
a) Checks object references
b) Checks object content
c) Compares memory addresses
d) Always returns false
What is the result of the expression: "hello" == "Hello" in Java?
a) true
b) false
c) Compilation error
d) NullPointerException
Which operator is used to compare two values for inequality in Java?
a) !=
b) =
c) <>
d) ><
Answers:
a) ==
c) Not equal to
a) >
b) false
b) <=
a) true
a) !=
a) Checks object references
b) false
a) !=
No comments:
Post a Comment