Its a pretty simple question, how do i add a number to "Number[]" one at a time?
Its a simplified example: normally to fill number we do this:
Number[] series1Numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9}
But how do i add a number to the end of this? like this should result in the same as above:
for(int i=1; i<10; i++){
nextNumber = i;
Number[] seriesOfNumbers = {+ nextNumber}; //This dosnt work, so i need to change it somehow
}