kayleeblanton8098 kayleeblanton8098
  • 21-12-2019
  • Computers and Technology
contestada

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

Respuesta :

bachelor
bachelor bachelor
  • 21-12-2019

Answer:

(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

Answer Link

Otras preguntas

how can you tell if u are going to get a negative answer when u are adding two integers
A helicopter pad with a diameter of 15 yards
Who conquered the area shaded in green on the map? A. Huizong B. Genghis Khan C. Wendi D. Xuanzong
Tom’s willingness to work impressed his employer. Identify the words in bold. A. gerund B. preposition C. infinitive D. verb
What type of OSHA inspection is conducted when immediate death or serious harm is likely?
how do u add/subtract/multiply/divide fractions with whole numbers? PLZ help!!
name the type of subunits that form starch
Globally, less than two-thirds of women receive assistance from a skilled healthcare worker during childbirth.
why did the american revolution occur
Given the function g(x) = 4x −5, compare and contrast g(2) and g(−4). Choose the statement that is true concerning these two values. The value of g(2) is larg