Test Series - java

Test Number 19/64

Q: What are the two possible Logical Operator types?
A. Bitwise Logical
B. Boolean Logical
C. Arithmetic Logical
D. A and B
Solution: no solution
Q: Boolean logical operators in Java work with?
A. true/false boolean data
B. 1 and 0 of individual Bits
C. characters of a String
D. None of the above
Solution: no solution
Q: Bitwise logical operators in Java work with?
A. true/false boolean data
B. 0 and 1 individual bits of data
C. Characters of a String
D. None of the above
Solution: no solution
Q: In general Bitwise logical operators are simply called?
A. Logical operators
B. Bitwise operators
C. Binary operators
D. None of the above
Solution: Yes. Do not call Bitwise operators by adding the word Logical. It is confusing for any one.
Q: What is the input for Logical Operators?
A. 1 and 0
B. true / false
C. char / String
D. None of the above
Solution: no solution
Q: What is the output of any Logical operation in Java?
A. 1 or 0
B. true or false
C. char or String
D. None of the above
Solution: no solution
Q: Which is the Logical operator in Java that works with a Single Operand?
A. Logical AND
B.  Logical OR
C. Logical Exclusive OR
D. Logical NOT
Solution: no solution
Q: Which among the following is a Logical Unary NOT operator in Java?
A.  ~
B. !
C. #
D. ^
Solution: ~ is a Bitwise Unary NOT that complements bits from 0 to 1 and 1 to 0.
Q: What is the output of the Java code snippet?
boolean b=false;
b = !b;
System.out.println(b);
A. true
B. false
C. Compiler error
D. None of the above
Solution: no solution
Q: Which among the following is a Short Circuit AND operator?
A. &
B. &&
C. |
D. ||
Solution: Two ampersands &&

You Have Score    /10