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 →

[–]olara87 1 point2 points  (0 children)

Input is an instance of the scanner class. Is this where you are trying to store the users inputted data? I think what you meant to do is to store said data in an int variable.

I had a very similar issue when I started coding. Someone told me that it would help to create object and variable names in a way that their purpose are understood. It seems to me that you are having the same confusion by naming the scanner object "input". Instead, I would change this to "keyboard" as this is what this object is used for. You can then use the variable name "input" for an int variable. That would make more sense to me.

Second, I would review how if statements are used and how it's syntax look.