Click here to Skip to main content
15,881,715 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
if( (word1 != word2) && (word1 != word3) && (word 2 != word3) ) {
outputString = outputString + "\n\nYou have won $0";

I am getting an error code here. please help me :(

What I have tried:

what netbeans has told me to do.
Posted
Updated 25-Oct-18 20:29pm
Comments
Richard Deeming 25-Oct-18 14:22pm    
"I am getting an error code here."

And you didn't think we'd need to see the details of that error code?

Click the green "Improve question" link and update your question with a proper description of the problem. Include the full details of the error, and the declarations of the variables you're using.
Member 14032987 25-Oct-18 17:22pm    
I FEEL LIKE AN IDIOT. Thank you

It would be REALLY helpful if you provided the full code of the routine, the error received, what netbeans told you to do along with the result

Just to the naked eye with what you have
Java
if( (word1 != word2) && (word1 != word3) && (word 2 != word3) )
// look at the third comparison: "word 2"       ^^^
ALSO No definition seen for "outputString"
AND No closing "}" for the "then" portion of the statement
 
Share this answer
 
As an additional observation, please note: Java string comparison should be performed using the equals[^] method, not the == operator. See, for instance, How do I compare strings in Java? - Stack Overflow[^].
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900