I want to validate a response in java with a method, but something happens with the condition of the do-while since it is not able to get out of the loop.
public static String siNo() {
Scanner in =new Scanner(System.in);
String respuesta;
do {
System.out.print(" > ");
respuesta=in.next();
System.out.println();
System.out.println("Estoy detro del metodo "+respuesta);
} while (!respuesta.equalsIgnoreCase("S") || !respuesta.equalsIgnoreCase("N"));
return respuesta;
}