== compares the references. If you want to compare the references use, == and if you want to compare the contents, use equals().
Type: Posts; User: Mr.777
== compares the references. If you want to compare the references use, == and if you want to compare the contents, use equals().