A

Admin • 828.43K Points
Coach

Q. Which array declaration is valid?

  • (A) int arr[] = new int();
  • (B) int arr[] = new int[5];
  • (C) int arr = new int[5];
  • (D) int[] arr = int[5];
  • Correct Answer - Option(B)
  • Views: 13
  • Filed under category Java
  • Hashtags: Java Array

Explanation by: Admin
Option B is valid: it allocates an array of size 5.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.