Question: What are the outputs for the codes below? Also, how do I know for #1 and #3 if they are double or int? 1. System.out.print(15.7
What are the outputs for the codes below? Also, how do I know for #1 and #3 if they are double or int?
1. System.out.print(15.7 % 5);
a. .7
b. .3
c. 3
d. 0
e. 12
2. double x = 5 / 3;
System.out.print(x);
a. 0
b. 1
c. 1.66
d. 1.0
e. 2
3. System.out.print(9/11);
a. .8
b. 1
c. 2
d. 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
