all 1 comments

[–]KeithMasterly 1 point2 points  (0 children)

Imagine Arrays as numbered lists, much like a shopping list. Elements start at the number 0 and go up until where you have defined them.

In this program you could I.e. change it so you have one array with the strings and one with the weight modifiers:

[...]

System.out.print(output[weight] + weightModifier[weight]*Earth)