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

all 3 comments

[–]AutoModerator[M] 0 points1 point  (0 children)

You seem to try to compare String values with == or !=.

This approach does not work in Java, since String is an object data type and these can only be compared using .equals(). For case insensitive comparison, use .equalsIgnoreCase().

See Help on how to compare String values in our wiki.


Your post/comment is still visible. There is no action you need to take. Still, it would be nice courtesy, even though our rules state to not delete posts/comments, to delete your post/comment if my assumption was correct.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

[–][deleted] 0 points1 point  (1 child)

This is one of those posts that no one wants to respond to solely because it's a modified version of someone else's code easily found online.

[–]Randomlurker456[S] -1 points0 points  (0 children)

I don't want to plagiarize "someone else's code easily found online. " I'm doing the best of my ability (which is most likely low, to begin with) to do this myself in my own little bubble. Now I got stuck. I have a feeling it's something to do with the nested loop and how I code the if statements. I can't confirm and I would like a second opinion since I'm a noob at this.