I know that, in Java, two strings should typically be compared using a .equals() method, and that using == only compares memory locations. However, I wrote up this test code real quick in Eclipse and it's returning true and no one that I'm working with can figure out why. Did Java update to support direct comparisons of strings and just no one realized or are we crazy? Stack Overflow won't let me post a picture of the console but it prints out true.
Here's the code:
public class Thing {
public static void main(String[] args){
String ar = "fish";
String ar2 = "fish";
System.out.println(ar == ar2);
}
}