R

Ranjeet • 34.60K Points
Instructor I

Q. How do you declare and initialize an array of integers with 5 elements in Java?

  • (A) int[] numbers = new int[5];
  • (B) int[5] numbers; numbers = {1, 2, 3, 4, 5};
  • (C) int numbers[5] = {1, 2, 3, 4, 5};
  • (D) All of the above
  • Correct Answer - Option(A)
  • Views: 39
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics