Ask Question
17 November, 18:01

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

+1
Answers (1)
  1. 17 November, 18:50
    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 and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers