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

Operators in Java - IV

The document covers operators in Java, providing exercises to find outputs based on given code snippets. It includes tasks for determining appropriate data types for various expressions and a challenge to calculate a specific value based on variable manipulations. The content is part of a module in Abhishek Sir's Java classes.

Uploaded by

saksham.rkl2010
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

Operators in Java - IV

The document covers operators in Java, providing exercises to find outputs based on given code snippets. It includes tasks for determining appropriate data types for various expressions and a challenge to calculate a specific value based on variable manipulations. The content is part of a module in Abhishek Sir's Java classes.

Uploaded by

saksham.rkl2010
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

ABHISHEK SIR'S JAVA CLASSES | OPERATORS IN JAVA

OPERATORS IN JAVA
MODULE - IV
I. Find the Output:

1. int a=11, b=4;


i. int x = a / b;
ii. int x = a * b;
iii. int x = a % b;
iv. double x = b / a;
v. int x = b / a;
vi. double x = (double)a / b;
vii. int x = (double)a * b;
viii. double x = b * 2D;
ix. double x = b % a;
x. int x = a + 5D;

2. Write appropriate data type for the following:


i. m = (45 > 9)? true : false;
ii. m = (int)55.63 / 11;
iii. m = “863” + 94.17;
iv. m = “73.42” + ‘6’;
v. m = (78.63 < 56.21 )? “true” : “false”;
vi. m = (int)2.77 * (int)6.89;
vii. m = ‘B’ + 2;
viii. m = “2” + 12D;
ix. m = 3 + 6L;
x. m = 3.0 + 5;

3. int a=3, b=7;


int s=(b-- - ++a + a++ - --b <= a-- - ++a + b++ - a) ? a++ + ++b : a – b++ + --a;
Find value of s

Abhishek Sir’s Java Classes © Copyright Reserved


1

You might also like