I\'m a beginner in coding. I was recently working with to create a chatting programme where a user will chat with my computer. Here is a part of the code:
Sy
Here are some common symbols used in everyday language and their programming analogues:
&&, in Java.||, in Java."XOR" is simply "x || y but both cannot be true at the same time". This translates to x ^ y in Java.
In your code, you probably meant to use "or" (you just used the incorrect "incorrect solution" :p), so you should use "||" in the second code block for it to become identical to the first code block.
Hope this helped :)