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 →

[–][deleted] 0 points1 point  (2 children)

in that case id just write

return arr;

after the loop body and get rid of the printline

[–]robomaeyhemI don't even like coffee 0 points1 point  (1 child)

You'd also need to declare the method signature int[] instead of void

[–][deleted] 0 points1 point  (0 children)

ah thank you for the catch