+ 1
I want to know how to create dynamic array in java without using ArrayList.
Is there any simplest method for dynamically creating arrays without initialization.
5 Respostas
+ 2
without initialization? you can't.
but you can use arraycopy method.
+ 1
okay
+ 1
to creat dynamic array follow the syntax:-
data type arrayname[]=new data type[n];
+ 1
Amrit Kumar Sah But we have to define size n.I am not sure about my array and I want dynamically add elements by user input.
+ 1
I think arraylist is the only way