CMIS 141 Quiz 2 version 1 Questions and Answers
CMIS 141, Quiz 2, version 1 1. Using the Google style guide document, select the proper declaration of a Java constant. a. int CONSTANT SPEED = 3.0; b. double final SPEED = 3.0; c. float FINAL speed = 3.0; d. Final SPEED = 3.0; e. None of the above 2. What is the output of the following Java code: ______________________. public class Quizzes { public static void main(String args[]){ int momAge = 62; int dadAge = 64; Sln(M(momAge, dadAge) + M(momAge, dadAge)); } } 126 3. What method would you use in the Scanner class to read an int from standard input in Java? a. nextBoolean(); b. nextFloat(); c. nextByte(); d. nextInt(); e. None of the above 4. What is the value of balance after the following code is executed? int balance = 10; while (balance >= 1) { if (balance < 9) { break; } balance = balance - 9; } a. –1 b. 0 c. 1 d. 2 e. None of the above
Written for
Document information
- Uploaded on
- September 2, 2021
- Number of pages
- 36
- Written in
- 2021/2022
- Type
- Exam (elaborations)
- Contains
- Questions & answers
Subjects
- cmis 141
- quiz 2
- version 1
- cmis 141 quiz 2 version 1
- cmis 141
- quiz 2
- cmis 141 quiz 2
-
version 1 questions and answers
-
cmis 141 quiz 2 version 1 questions and answers