Answer the question
In order to leave comments, you need to log in
How to add an integer to an array?
Good afternoon.
Where am I wrong?
Answer the question
In order to leave comments, you need to log in
an array is not a dynamic structure. you need to set its size at the beginning
int[] x = new int[5];
x[0] = 1;
int[] x = new int[]{n};
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question