Question: Suppose that a variable a is declared as double a = 3.14159. What does each of the following print? a. System.out.println(a); b. System.out.println(a+1); c. System.out.println(8/(int)
Suppose that a variable a is declared as double a = 3.14159. What does each of the following print?
a. System.out.println(a);
b. System.out.println(a+1);
c. System.out.println(8/(int) a);
d. System.out.println(8/a);
e. System.out.println((int) (8/a));
Explain each outcome.
Step by Step Solution
There are 3 Steps involved in it
Sure lets go through each of these statements one by one double a 314159 This declares the variable ... View full answer
Get step-by-step solutions from verified subject matter experts
