# Operators QuizJ8 Home « Operators Quiz

The questions in this Java quiz are on the topics covered in the Java - Fundamentals section of the site. The table below lists the lesson used for each quiz, a description of the lesson content and the quiz number and questions associated with that lesson.

### Fundamentals Quizzes Summary

Click on a lesson in the table to go to that lesson for a refresher on the topics for that quiz.

Click on a quiz in the table to go straight to the quiz for a particular lesson.

Fundamentals Lessons Description Quiz Info.
Lesson 2 - Code Structure & SyntaxFor this lesson we look at the code structure of a Java source file and look at some syntax.Quiz1
8 questions
Lesson 3 - Primitive VariablesThis lesson is about the primitive variable data types available in Java.Quiz2
8 questions
Lesson 4 - Method ScopeIn this lesson we look at Java method scope and what scope and its definition mean.Quiz3
8 questions
Lesson 5 - OperatorsThis lesson is the first of two about the symbols used in Java for mathematical and logical manipulation.This quiz.
6 questions
Lesson 6 - Bitwise OperatorsIn our second lesson on operators we look at the Java bitwise operators.Quiz5
6 questions
Lesson 7 - Conditional StatementsIn this lesson we look at the conditional statements available in Java.Quiz6
8 questions
Lesson 8 - Loop StatementsThis lesson is all about the loop statements available in Java.Quiz7
8 questions

### Fundamentals Quiz 4

The quiz below tests your knowledge of the material learnt in Fundamentals - Lesson 5 - Operators.

Question 1 : What values do `a` and `b` hold after the following expressions?

`int a = 5; int b = 10; b = a++;`
- a = 6 and b = 5 as the the postfix increment is applied after the expression is evaluated.
Question 2 : What symbol do we use for XOR (exclusive OR)?
- The ^ symbol is used for XOR (exclusive OR).
Question 3 : When could we use the || short-circuit operator?
- The || Short circuit operator can be more efficient when the first operand of an OR has a `true` value and therefore the OR criteria is met.
Question 4 : We can convert a `boolean` to an `int` using a cast?
- The boolean type is not only incompatible but also inconvertible with other types.
Question 5 : What is the result of a logical operator?
- The result of a logical operation is the boolean type.
Question 6 : Which code will work?
- C is the correct answer. We don't have to use the same type for the cast as long as the the cast is not widening. We will just get back the first 8 bits of the value.

### What's Next?

The next quiz on Java is all about Bitwise Operators.