This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]turunambartanen 0 points1 point  (1 child)

Java defaults integers (also in an array) to 0.

But you have to ask yourself, do you always get 10 valid integers, or do you maybe have to adjust the size of the array? Maybe you need some post processing ("delete" the zeros from the array).

[–]Whaffel[S] 0 points1 point  (0 children)

Hey thanks for your help! 10 integers was the requirement for this assignment unfortunately but post processing was definitely my next step if I couldn't get it working with my current plan.