Ask Question
17 May, 18:13

Which of the following creates an array of 25 components of the type int?

(i) int[] alpha = new[25];

(ii) int[] alpha = new int[25];

+5
Answers (1)
  1. 17 May, 19:51
    0
    (ii) int[] alpha = new int[25];

    Explanation:

    In JAVA in order to create an array;

    int name[];

    name = new int[size];

    can be written like above, however, to make it shorter can be written like below;

    int[] name = new int[size];

    Well, name is the array name you assign, int is the type of an array as integer and size you assign for an array, in that sense (ii) is the correct answer

    (ii) int[] alpha = new int[25];

    alpha is the name of an array

    int is the type of array as an integer

    25 is the size of an array
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Which of the following creates an array of 25 components of the type int? (i) int[] alpha = new[25]; (ii) int[] alpha = new int[25]; ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers