Courseiva
Question 140 of 481
Arrays and MethodseasyMultiple ChoiceObjective-mapped

1Z0-811 Arrays and Methods Practice Question

A method is needed to return a new array where each element is doubled. Which method signature correctly accomplishes this?

⚠ Common exam trap

Oracle often tests the distinction between returning a single value versus an array, and candidates may confuse the return type `int` with `int[]` or forget that the parameter must match the array type to process multiple elements.

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

public int[] doubleArray(int[] input)

The method must return a new array with doubled values, so the return type must be `int[]` (an array of integers) and the parameter must be an `int[]` (the input array). This signature allows the method to accept an array, process each element, and return a new array of the same length with each element doubled.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • public int doubleArray(int[] input)

    Why it's wrong here

    Return type int does not match expected output array.

  • public int[] doubleArray(int[] input)

    Why this is correct

    Correct return type and parameter.

  • public int[] doubleArray(int input)

    Why it's wrong here

    Parameter type should be int[] to receive an array.

  • public void doubleArray(int[] input)

    Why it's wrong here

    Void return type does not return the new array.

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 →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

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.

Loading comments…

Sign in to join the discussion.

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.