import java.util.Scanner;
public class OrigClass {
public static void main (String[] args){
Scanner ScanObj = new Scanner(System.in);
System.out.println("Set Password: ");
String SetPass = ScanObj.nextLine();
System.out.println("Guess Password: ");
String GuessPass = ScanObj.nextLine();
while (GuessPass != SetPass){
System.out.println("Incorrect. Try Again: ");
GuessPass = ScanObj.nextLine(); }}}
So as you can see I'm trying to make a very simple program that lets the user enter a password then re-enter it. I'm a little confused as to why this isn't working. I've tried everything I can think off and have read up on other similar problems on here, but can't find anything...
Sorry if this is a bit basic, but it's annoying me that I can't get this to work :(