174k views
21 votes
I have a question about this programming assignment. The outcome when the user puts in Taylor for guest one and Fernando for guest 2 should be, "Your party is ruined and another bad pop song will be written." However, it does not. What do I add to get this outcome? Do I need more brackets?

I have a question about this programming assignment. The outcome when the user puts-example-1

2 Answers

3 votes

Use guestNumber1.equals(Fernando) instead of the double equal signs. You cant compare strings with ==

User Simon Holroyd
by
5.8k points
13 votes
Yes u need more brackets
User Diana
by
6.1k points