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

Java Arithmetic Worksheet

The document is a worksheet containing questions and answers about Java arithmetic operators. It covers basic operations such as addition, subtraction, multiplication, division, and modulus, along with operator precedence. The answers provide specific outputs for given code snippets and clarify the use of operators in Java.
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)
3 views1 page

Java Arithmetic Worksheet

The document is a worksheet containing questions and answers about Java arithmetic operators. It covers basic operations such as addition, subtraction, multiplication, division, and modulus, along with operator precedence. The answers provide specific outputs for given code snippets and clarify the use of operators in Java.
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

Java Arithmetic Operators Worksheet

Questions:

1. What is the output of: int x = 10, y = 3; [Link](x + y);

2. What is the output of: int x = 10, y = 3; [Link](x - y);

3. What is the output of: int x = 10, y = 3; [Link](x * y);

4. What is the output of: int x = 10, y = 3; [Link](x / y);

5. What is the output of: int x = 10, y = 3; [Link](x % y);

6. Name the operator used for multiplication in Java.

7. Which operator gives the remainder?

8. According to precedence, which will be solved first: x + y * z?

9. What will be the result of: int x = 10, y = 3; double d = x / y;

10. Arrange in correct precedence order: Addition, Division, Brackets

Answers:

1. 13

2. 7

3. 30

4. 3

5. 1

6. *

7. %

8. Multiplication

9. 3.0

10. Brackets → Division → Addition

You might also like