+ 2

How do i write a code for a single dimensional array that does not have an estimated size, i.e depending on the user's input.

18th Oct 2018, 12:37 PM
Habeeb Grillo
Habeeb Grillo - avatar
7 Respuestas
+ 2
If you are looking for adjustable as needed, ArrayList is a class that allows adding or removing as you get instructed by the user.
18th Oct 2018, 1:04 PM
John Wells
John Wells - avatar
+ 2
here a bit of example int size; scan.nextInt(size); int[size]array
18th Oct 2018, 12:48 PM
Taste
Taste - avatar
+ 1
Can't you make the array after the user inputs something?
18th Oct 2018, 12:41 PM
TurtleShell
TurtleShell - avatar
+ 1
okay, so how do i go about that
18th Oct 2018, 12:44 PM
Habeeb Grillo
Habeeb Grillo - avatar
+ 1
thanks,
18th Oct 2018, 12:50 PM
Habeeb Grillo
Habeeb Grillo - avatar
+ 1
yes something like this, how do go about it?
18th Oct 2018, 1:08 PM
Habeeb Grillo
Habeeb Grillo - avatar
+ 1
18th Oct 2018, 1:17 PM
John Wells
John Wells - avatar