Use equals like any other method: var.equals(vsr2)
Also posted at http://www.java-forums.org/new-java/62941-how-compare-variable-multiple-variable.html
Type: Posts; User: Norm
Use equals like any other method: var.equals(vsr2)
Also posted at http://www.java-forums.org/new-java/62941-how-compare-variable-multiple-variable.html
The == operator is for comparing primitives. The equals() method is for comparing the contents of objects.
What is the code comparing? Primitives or object contents?