I'm only new to java and trying to make an equals code, but it won't work with ==, only with .equals() not sure why.
    import java.lang.*;
    import java.util.*;
    public class password
    {
        public static void main(String args[]) 
        {
            Scanner Keyboard = new Scanner(System.in);
            String guess = Keyboard.newLine();
            String password = "1password";
            if (guess == password) {
                System.out.println("Welcome");
            } else {
                System.out.println("Login Failed");
            }
        }
    }
 
     
     
     
    