Self-Quiz Unit 1_ Attempt review _ Home
Self-Quiz Unit 1_ Attempt review _ Home
Question 1
Correct
Mark 1.00 out of 1.00
What is the value of "result" after executing the following code snippet?
int result = 10;
result -= 2 * 3;
a. 4
b. 6
c. 8
d. 10
https://my.uopeople.edu/mod/quiz/review.php?attempt=15373529&cmid=433498 1/4
07/09/2024 20:56 Self-Quiz Unit 1: Attempt review | Home
Question 2
Correct
Mark 1.00 out of 1.00
Which of the following is the correct way to declare and initialize an array in Java?
a. int[ ] numbers = new int[5] {1, 2, 3, 4, 5};
b. int[ ] numbers = {1, 2, 3, 4, 5};
c. int numbers[ ] = new int[ ]{1, 2, 3, 4, 5};
d. int numbers = [1, 2, 3, 4, 5];
Question 3
Correct
Mark 1.00 out of 1.00
Which of the following is the correct way to declare a constant variable in Java?
https://my.uopeople.edu/mod/quiz/review.php?attempt=15373529&cmid=433498 2/4
07/09/2024 20:56 Self-Quiz Unit 1: Attempt review | Home
Question 4
Correct
Mark 1.00 out of 1.00
Which of the following data types in Java is NOT used to store integer values?
a. int
b. long
c. byte
d. float
Question 5
Correct
Mark 1.00 out of 1.00
a. True
b. False
c. 10
d. 5
https://my.uopeople.edu/mod/quiz/review.php?attempt=15373529&cmid=433498 3/4
07/09/2024 20:56 Self-Quiz Unit 1: Attempt review | Home
Question 6
Correct
Mark 1.00 out of 1.00
a. 10
b. 15
c. 25
d. 30
https://my.uopeople.edu/mod/quiz/review.php?attempt=15373529&cmid=433498 4/4