180k views
4 votes
Assume that the following array has been defined, though you do not necessarily know its length. int[] numbers = new int[??]; What expression should be used:/

1 Answer

6 votes

Answer:

int array_length;

int [ ] numbers = new int[array_length];

Step-by-step explanation:

Since you do not know the length of the, it is important that you declare and provide a variable of type integer, so you can request the user to input the length of the array

User David Hofmann
by
5.3k points