Programming Languages Java Objective
Mar 01, 2013

Which one of the following will declare an array and initialize it with five numbers?

Choose the correct answer:
A) Array a = new Array(5);
B) int [] a = {23,22,21,20,19};
C) int a [] = new int[5];
D) int [5] array;
Detailed Explanation

Option B is the right answer.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback