0% found this document useful (0 votes)
122 views1 page

Java Operators Worksheet

The document is a worksheet focused on operators in Java, covering definitions, types, and examples of various operators including arithmetic, relational, and logical operators. It includes questions for differentiation, programming tasks, and fill-in-the-blank exercises. Additionally, it features matching questions and true/false statements to reinforce understanding of Java operators.

Uploaded by

mehtamannan652
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
122 views1 page

Java Operators Worksheet

The document is a worksheet focused on operators in Java, covering definitions, types, and examples of various operators including arithmetic, relational, and logical operators. It includes questions for differentiation, programming tasks, and fill-in-the-blank exercises. Additionally, it features matching questions and true/false statements to reinforce understanding of Java operators.

Uploaded by

mehtamannan652
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Worksheet on Operators in Java

Answer the following questions:

1. What is an operator in Java? Name the types of operators available in Java.

2. Differentiate between unary, binary, and ternary operators with examples.

3. Write a Java program to demonstrate the use of arithmetic operators (+, -, *, /, %).

4. What is the difference between '==' and '=' in Java? Explain with an example.

5. Explain the use of logical operators (&&, ||, !) in Java with truth tables.

6. Write a Java program to demonstrate relational operators (>, <, >=, <=, ==, !=).

7. Fill in the blanks:

a) ______ operator is used to add two numbers.

b) ______ operator checks if two values are not equal.

c) The ______ operator is used for conditional expressions.

8. Match the following:

a) && i) Assignment Operator

b) ?: ii) Logical AND

c) += iii) Ternary Operator

d) == iv) Equality Operator

9. What are bitwise operators? List and explain each with an example.

10. State whether the following are true or false:

a) '++' is a unary operator.

b) '&&' is a relational operator.

c) '+=' is a compound assignment operator.

You might also like