Java – Convert Array to List

Convert Array to List in Java

Output:

How many elements you want to add to the array:
red white green

red white green