MCQ Practice Single Best Answer Topic: Functions / Methods in Programming Languages

Q What does the following method return?

public int[] getData() {
    return new int[]{5, 10, 15};
}

Question ID
#24714
Subchapter
Functions / Methods in Programming Languages
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A Three values
  • B One array object
  • C Compilation error
  • D Two values
Correct Answer: B

Explanation

✅ Answer: B) One array object

Share This Question

Share this MCQ with your friends or study group.