0
how to assign values using arrays at runtime ?
2 Respostas
+ 2
int [] nums = new int [size];
for (int i=0; i <size; i++){
Scanner input = new Scanner(System.in);
nums [i] = input.nextInt ();
}
choose the size of ur array urself or fill it dynamically
+ 1
for runtime is better to use arraylist except arrays