The first s == "Computer"
test will fail, since s
and the literal string "Computer"
are sitting at different addresses.
The second s.equals("Computer")
will succeed. The two strings have equal contents.
Any good tutorial book on Java would explain that better than we have time to.