[ Team LiB ] Page 106

[ Team LiB ] Review Questions 3.4 Which of the following expressions will be evaluated using floating-point arithmetic? Select the three correct answers. a. 2.0 * 3.0 b. 2 * 3 c. 2/3 + 5/7 d. 2.4 + 1.6 e. 0×10 * 1L * 300.0 3.5 What is the value of the expression (1 / 2 + 3 / 2 + 0.1)? Select the one correct answer. a. 1 b. 1.1 c. 1.6 d. 2 e. 2.1 3.6 What will be the result of attempting to compile and run the following program? public class Integers { public static void main(String[] args) { System.out.println(0×10 + 10 + 010); } } Select the one correct answer. a. The program will not compile. The compiler will complain about the expression 0×10 + 10 + 010. b. When run, the program will print 28. c. When run, the program will print 30. d. When run, the program will print 34. e. When run, the program will print 36. Page 107

Hint: If you are looking for high quality and reliable webspace provider to host and run your jsp hosting application check Virtualwebstudio jsp web hosting provider

Comments are closed.