import java.util.Scanner;
public class SecretWord {
public static void main( String[] args ) {
Scanner input = new Scanner(System.in);
String secret = "Please", guess;
System.out.print( "Secret word?" );
guess = input.next();
for (int i = 0; guess.equals(secret); i++) {
if( guess.equals(secret) ) {
System.out.println("enter");
} else {
System.out.println( "try again" );
}
}
}
}
How do I make it so that, when a user enters anything other than "Please", it will ask him/her to try again? Then the user will have to enter "Please", end the loop, and print "Enter".