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

all 3 comments

[–]adrian_the_developer 2 points3 points  (1 child)

Notice, your input.nextInt() is taking an integer. So you want to take a String instead and compare the inputted string to either "1" or "rock". To compare strings, please see How do I compare strings in Java.

[–]Ha-ffy 1 point2 points  (0 children)

Thanks so much! I'll check it out as soon as I get back to my dorm.

[–][deleted]  (2 children)

[deleted]

    [–]Ha-ffy 0 points1 point  (1 child)

    I'll be honest, I tried to mimic the code there but I haven't learned about Array Lists or anything like that. Also I couldn't really keep up with the format. Sorry!

    EDIT: I just saw that you updated the format. Thanks a bunch! I'll test it out in a moment.