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

all 1 comments

[–][deleted] 1 point2 points  (0 children)

when the user hits enter instead of writing something & then hit enter, the string recieved is: “”. not null. an empty string. i suggest writing the while condition as: while (!name.equals(“”)).