Computer Science, asked by apdimple7, 5 months ago

write a conditional statement to check the value of the character variable var as Y or y​

Answers

Answered by pragyan169
5

Explanation:

(userDecision != 'Y' || userDecision != 'y' || userDecision != 'n' || userDecision != 'N')

{

System.out.println("Error: invalid input entered for the interstate question");

System.exit(0);

}

Irregardless of what is in the variable it always returns true and executes the command to exit the program,

Similar questions