Is
String test1 = "something"
just syntactic sugar for
String test2 = new String("something")
and if it is why do the following lines return different results? (I know the difference between using the == operator and the equals() method)
System.out.println(test1 == "something"); // returns true
System.out.println(test2 == "something"); // returns false
Or is there something more?