Not quite, you are comparing 2 constants in that and because the JVM does some stuff with string constants to make them the same object, this expression will be true. However
new String("Hello World") == new String("Hello World")
will always be false as they are not the same object