TOTAL QS = 20Time [ 00 : 00 : 00 ]
00:00:00

Java Basics: Bitwise Operators Online Test 1

Instructions

Total Questions: 20

Total Minutes: 20

This ExamTray Free Online Exam/Quiz/Trivia tests your Java Programming Skills on Java Bitwise Operators and their priority & associativity. You will be tested on Bitwise AND, OR, NOT, XOR/Exclusive OR. This test displays answers after finishing the exam for review. You can easily clear Competitive Exams and Job Interview Questions.

Go through Java Theory Notes on Bitwise Operators before attempting this test.

All the Best

Challenge SCORE

0 / 20

Take This Exam
1) Identify the Bitwise NOT operator in Java below.
2) Bitwise operators in Java work with?
3) Find operators that work as both Logical operators and Bitwise operators in Java?
4) If relational operators are present in an expression, what type of other operators may be used?
5) What is the name of << bitwise operator in Java?
6) What is this >> bitwise operator in Java?
7) What is this >>> bitwise operator in Java?
8) Left Shift (<<) in Java is equivalent to?
9) Right Shift >> in Java is equivalent to?
10) What is the output of the Java code snippet?
byte a = 0b0000_0001;
System.out.println(~a);
11) What does this Java code snippet prints?
int b=45;
String str="";
while(b > 0)
{
  str = str + b%2;
  b = b/2;
}
StringBuilder sb = new StringBuilder(str);
sb.reverse();
System.out.println(sb.toString());
12) What is the output of the Java code snippet?
System.out.println(0b0000_1000);
13) What is the output of a Bitwise AND (&) operation if both the inputs/operands are 1s?
14) What is the output of a Bitwise OR (|) operation if both the inputs are 1s?
15) What is the output of a Bitwise AND (&) operation if one of the inputs/operands is 0?
16) What is the output of a Bitwise OR (|) operation if one of the inputs/operands is 1?
17) What is the output of a Bitwise AND (&) operation if one of the inputs/operands is 1?
18) What is the output of a Bitwise OR (|) operation if one of the inputs/operands is 0?
19) What is the output of a Bitwise Exclusive OR (^) operation if both of the inputs/operands are 0s or 1s?
20) What is the output of a Bitwise Exclusive OR (^) operation if both the inputs/operands are different?
Certification Group ID
3845

Open Certification Helper Popup Reset Popup