Question 377 of 481
1Z0-811 Arrays and Methods Practice Question
Which two statements about method parameter passing in Java are true? (Choose two.)
⚠ Common exam trap
Many candidates confuse 'pass-by-reference' with 'pass-by-value of a reference,' leading them to incorrectly believe that reassigning an object parameter inside a method affects the caller's reference, or that primitive types are passed by reference.
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
✓
When a primitive type is passed to a method, a copy of the value is passed.
Java always passes primitive types (like int, double, boolean) by value, meaning a copy of the actual value is made and passed into the method. Any modifications to the parameter inside the method affect only the copy, not the original variable in the caller.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
When an array is passed to a method, changes to the array elements inside the method are not reflected in the caller.
Why it's wrong here
Changes to array elements modify the same array object, so they are reflected.
- ✗
When an array is reassigned inside a method, the original array in the caller is also reassigned.
Why it's wrong here
Reassigning the parameter only changes the local reference, not the caller's reference.
- ✓
When a primitive type is passed to a method, a copy of the value is passed.
Why this is correct
Primitives are pass-by-value, so the original variable is not modified.
- ✓
When an object is passed to a method, a reference to the object is passed by value.
Why this is correct
The reference is copied, so the method can modify the object's state but cannot change which object the caller's reference points to.
- ✗
When a String is passed to a method, the method can modify the original String.
Why it's wrong here
Strings are immutable; any modification creates a new String object.
About these practice questions
Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →
Last reviewed: Jun 25, 2026
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.
Question Discussion
Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.
Sign in to join the discussion.