1Z0-811 Arrays and Methods Practice Question
Which TWO statements are true about passing arrays to methods in Java?
⚠ Common exam trap
Many exam-takers confuse 'pass by reference' with 'pass by value of the reference,' leading them to incorrectly believe that reassigning the parameter inside the method will affect the caller's variable (Option A), or that modifications to array elements require a return value (Option C).
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The method can modify the elements of the array.
Java passes object references by value. When an array is passed to a method, the method receives a copy of the reference to the array object. This copy still points to the same array object in heap memory, so the method can modify the elements of the array through that reference. These modifications are visible to the caller because they affect the same underlying array object.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The method can reassign the original array variable to a new array.
Why it's wrong here
Only the copy of the reference is changed.
- ✓
The method can modify the elements of the array.
Why this is correct
Changes to array elements affect the original array.
- ✗
The method must return the array to reflect any changes.
Why it's wrong here
Changes to elements are visible without returning.
- ✓
The method receives a copy of the array reference.
Why this is correct
Java passes object references by value.
- ✗
The method cannot determine the size of the array.
Why it's wrong here
The length field is accessible.
Go deeper
Related to this question
About these practice questions
One of 481 original 1Z0-811 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 1Z0-811 practice question is part of Courseiva's free Oracle certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 1Z0-811 exam.