public static void main(String[] args) {
Scanner user_input= new Scanner(System.in);
String userName = "cakesterman";
String passWord = "Test";
String input;
System.out.println("Correct username is: " + userName);
System.out.println("Enter Your Username: ");
input = user_input.next();
System.out.println("You entered: " + input);
if (input == userName) {
System.out.println("Username is correct");
}
else {
while (input != userName) {
System.out.println("Username Incorrect. Enter Your Username: ");
input = user_input.next();
if (input == userName) {
break;
}
}
}
}