Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C$140 COMPUTER PROGRAMMING IN JAVA SPRING 2018 MIDTERM EXAM Part 1: Multiple-cho

ID: 3725991 • Letter: C

Question

C$140 COMPUTER PROGRAMMING IN JAVA SPRING 2018 MIDTERM EXAM Part 1: Multiple-choice questions (60 points, 1.5 points each) 1. Every Java application is composed of at least one a local variable b. instance variable c. public class declaration d. imported class 2. What is the value of result after the following Java statements execute int a, b, c, d, result, b=12; c 37; d = 51; result d % a * c + a % b + a; c 51 d. 127 3. Which of the following is a valid fully qualified name? a. Scanner b. java.Scanner c. util.Scanner d. java.util.Scanner 4. Each of the following is a relational or equality operator EXCEPT b" =! C. 5. A class instance creation expression contains b. c. d. the new keyword the name of the class All of the above

Explanation / Answer

1 Answer) c. public class declaration
2 Answer) a. 119
3 Answer) d. java.util.Scanner
4 Answer) b. =!
5 Answer) d
6 Answer) b
7 Answer) c
8 Answer) a
9 Answer) d
10 Answer) c
11 Answer) b
12 Answer) a
13 Answer) b
14 Answer) c
15 Answer) a