You should take a look at ArrayList.
With it, you can cumulate all the successive values you receive, and with a for loop, you can display they all.
With it, you can cumulate all the successive values you receive, and with a for loop, you can display they all.