Loading…
Loading…
Ten exam-style questions on array declarations and initializers, default values, length and bounds, covariance and ArrayStoreException, Arrays.sort ordering, binarySearch results, fill and copyOf, with explanations.
Practice questions for the article Java Arrays: Creating, Sorting and Searching.
The questions follow Java 21 rules, as on the 1Z0-830 exam. Check every bracket and brace for syntax, then trace the indexes. Aim for at least 8 out of 10 before moving on.
Quiz path: step 23. Take the quizzes in this order, after reading each article.
Previous quiz: String Equality, the String Pool and intern (OCP 21)
Next quiz: Array Comparison, Varargs and Multidimensional Arrays (OCP 21)
10 questions · pass at 68%
Check your understanding; you see the answers and explanations after submitting.
Discussion
Sign in to ask a question or share what you learned.