so in the code below the behavior is as expected that a == b would return false since I used the keyword new. However when I print the memory addresses I get the same value. I think they should have separate memory addresses, also if they are the same why would == return false. The code below with j k l is the same concept.
String a = new String("test");
String b = new String("test");
System.out.println(a.equals(b));
System.out.println(a == b);
System.out.println(Integer.toHexString(a.hashCode()));
System.out.println(Integer.toHexString(b.hashCode()));
String j = "this";
String k = new String("this");
String l = "this";
System.out.println(j.equals(l));
System.out.println(j == l);
System.out.println(Integer.toHexString(j.hashCode()));
System.out.println(Integer.toHexString(l.hashCode()));