I have two strings, one is inputted by the user and one is the name of a thread. I inputted the name which should be the same as the thread. To verify this I have the program output
System.out.println("DS:" + DeamonMain.threadNameFinal + "CN:" +getName());
Which prints
DS:Thread-66CN:Thread-66
Now these appear to be the same string. However, when I have it test the validity of this using
boolean factChecker = DeamonMain.threadNameFinal == getName();
System.out.println(factChecker);
it prints false...
Why is this? Does this have to do with getName()? How are the string different and why so?