Language Fundamentals on Java related Questions and Answers


Question :   Which one of the following will declare an array and initialize it with five numbers?
1. Array a = new Array(5);
2. int [] a = {23,22,21,20,19};
3. int a [] = new int[5];
4. int [5] array;
Answer :   2 - int [] a = {23,22,21,20,19};  

* Be the First to Post a Comment.

Submit comment :


Captcha Image
Reload

Ask Question

Captcha Image
Reload

Note : Name and Email never shown.





Subscribe


Become a part of EducationForever. Subscribe to our FREE Newsletter