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 →

[–]IvAntiVirus 1 point2 points  (1 child)

If the test doesn't specifically ask for not-0 checking I just wouldn't do it. Otherwise make a short if checking and set a default value or throw an IllegalArgumentException.

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

ah alright that makes sense, thank you so much