1Z0-803 | A Review Of Vivid 1Z0-803 exam question
Q1. Identify two benefits of using ArrayList over array in software development.
A. reduces memory footprint
B. implements the Collection API
C. is multi.thread safe
D. dynamically resizes based on the number of elements in the list
Answer: AD
Q2. Given:
What is the result?
A. null
B. compilation fails
C. Java.lang.NullPointerException
D. 0
Answer: A
Q3. Given:
What is the result?
A. Marrown
String out of limits
JesOran
B. Marrown
String out of limits
Array out of limits
C. Marrown
String out of limits
D. Marrown
NanRed
JesOran
Answer: D
Q4. Given:
What is the result?
A. 2 4 6 8 10 12
B. 2 4 6 8 10 12 14
C. Compilation fails
D. The program prints multiple of 2 infinite times
E. The program prints nothing
Answer: B
Q5. Which two are valid declarations of a two-dimensional array?
A. int [] [] array2D;
B. int [2] [2] array2D;
C. int array2D [];
D. int [] array2D [];
E. int [] [] array2D [];
Answer: AD
Q6. Given:
What is the result?
A. 10 : 22 : 20
B. 10 : 22 : 22
C. 10 : 22 : 6
D. 10 : 30 : 6
Answer: B
Q7. Given the code fragment:
A. Values are : [EE, ME]
B. Values are : [EE, EE, ME]
C. Values are : [EE, ME, EE]
D. Values are : [SE, EE, ME, EE]
E. Values are : [EE, ME, SE, EE]
Answer: E
Q8. What is the proper way to defined a method that take two int values and returns their sum as an int value?
A. int sum(int first, int second) { first + second; }
B. int sum(int first, second) { return first + second; }
C. sum(int first, int second) { return first + second; }
D. int sum(int first, int second) { return first + second; }
E. void sum (int first, int second) { return first + second; }
Answer: D
Q9. Given the fragment:
A. 14
B. 15
C. 24
D. 25
E. 34
F. 35
Answer: F
Q10. Given:
Which code fragment, when inserted at line 7, enables the code print true?
A. Option A
B. Option B
C. Option C
D. Option D
Answer: A