Question: 3. Answer the following questions as comments below your class file or submit a text file: a. Give the type and value for each of

3. Answer the following questions as comments below your class file or submit a text file: a. Give the type and value for each of the following expressions: i. 7.8 > 78 ii. 12+13+19+21 iii. 2.3+5.7+7.1 iv. 2+4+"24" b. Without compiling/running the code, give the value printed by each of the following code fragments. Now compile/run and see if your answer was correct. Report the output and whether you were initially correct: i. The following code is using Newton's Method to calculate the square root of a number double t = 9.0; while (Math.abs(t-9.0/t) > .001) { t = (9.0/t+t)/ 2.0; System.out.println(t); ii. System.out.printf("%o3d".7); iii. String s = "Bye Bye Bye" S = s.replace('y', 'e'); System.out.println(s)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
