Chapter 4Creating and Using Arrays
THE OCA EXAM TOPICS COVERED IN THIS PRACTICE TEST INCLUDE THE FOLLOWING:
- Creating and Using Arrays
- Declare, instantiate, initialize and use a one-dimensional array
- Declare, instantiate, initialize and use multi-dimensional arrays
-
What symbol is used for a varargs method parameter?
- ..
- ...
- --
- ---
-
Fill in the blank in the following code to get the first element from the varargs parameter.
public void toss (Frisbee... f) {
Frisbee first = ____________;
}
- f
- f[0]
- f[1]
- None of the above
-
Which of the following are primitives?
int[] lowercase = new int[0];
Integer[] uppercase = new Integer[0]; ...
Get OCA / OCP Java SE 8 Programmer Practice Tests now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.