Search:

Type: Posts; User: Norm

Search: Search took 0.08 seconds.

  1. Replies
    3
    Views
    1,497

    Re: How to compare variable with multiple variable?

    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
  2. Replies
    3
    Views
    1,497

    Re: How to compare variable with multiple variable?

    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?
Results 1 to 2 of 2