Question: 5. Suppose we have the following declarations and initializations. Determine what the following statements output. double x 1.1314; double y 900.00; double z 35.4;
5. Suppose we have the following declarations and initializations. Determine what the following statements output. double x 1.1314; double y 900.00; double z 35.4; int num = 1000000; Sample: System.out.println(String.format("%7.2f", x)); outputs " 1.13" a. System.out.printf("%6s%n", "SMILE"); < b. System.out.println(String.format("%.2f", y/4)); < [4 marks] < 6. Suppose that x, y, and z are int variables and x = 1000, y = 15, and z = 2300. Determine whether the following expressions evaluates to true or false. Sample: (x>10) evaluates to false < a. (x=5) b. x=5 [4 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
