Ask 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];

+5
Answers (1)
  1. 14 December, 01:18
    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?
Find 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 the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers