This example will show how to compare strings in java. Java String comparison is a very common question among beginner java programmers.
Compare strings .equals
Compare strings compiler interned
Compare concatenated strings
Compare strings ignoring case
Compare null strings
Compare null strings w/ exception