As I am studying java, I have learned that the proper way to compare 2 Strings is to use equals and not \"==\". This line
static String s1 = \"a\"; static String s2
In the Code above you are not comparing the addresses of the strings, but their "location of a given field in the storage allocation", i.e. the location of the variables holding a reference to (the same) string.