+ 2

How to remove the error?

I want to make simple game Ouija board but I get the error, I don't know why the error in or(||) operator, please help.

15th Jan 2023, 6:36 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
4 RĂ©ponses
+ 6
// This will help, replace to the: if(user.equals("Is anyone here?") || user.equals("Is anyone here?" )) { System.out.println("The Ouija board says: " + responses[random.nextInt(responses.length-1)]);
15th Jan 2023, 7:28 AM
JaScript
JaScript - avatar
15th Jan 2023, 6:38 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
+ 2
JaScript thanks a lot
15th Jan 2023, 9:19 AM
Sakshi [Offline 🙃]
Sakshi [Offline 🙃] - avatar
0
You should link your code so that we can see the error as well.
15th Jan 2023, 6:37 AM
Chris Coder
Chris Coder - avatar