Java - String Methods Guess My Password
Create a new project called GuessMyPassword. This program will allow the user to guess the a password and will tell the user if they go it right or not:
REMEMBER:
You cannot use == when you are comparing Strings; you must use string1.equals(string2)
REMEMBER:
You cannot use == when you are comparing Strings; you must use string1.equals(string2)
//SAMPLE CODE
//DECLARE VARIABLES
String password = "L33TH4X0R";
String guess;
//Ask the user for a guess (INPUT)
//PRINT OUT IF THE GUESS IT WRONG OR NOT
// Use if( ){ }else{ } statement
// You cannot use == when you are comparing Strings; you must use string1.equals(string2)