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

What is a common place for a cadence to occur?
Pls, look at picture for the question.
PLEASE HELPP!!!!! Write an equation for the translation of y=2/x that has asymptotes x=8 and y=3
give the correct form of the word in brackets. "not drinking enough water will cause (dehydrate)​
The quadratic expression 4x^2-7x-2 represents the area of a rectangular garden. What is the perimeter of this garden?
How do pollutants add to the problem of plastic in the ocean? Pollutants stop predators from eating prey that have consumed plastics, unbalancing the food chain
If possible can someone help me with this problem.
A triangle has a perimeter of 51 feet. If the three sides of the triangle are n, 3n + 4, and 3n - 2, what is the length of each side? Separate multiple entries
Explain 5 effects of human right abuse​
Convert 11.2 kilometres into miles. Use 8 km = 5 miles