a == "java"
Posted: Sun Mar 10, 2013 10:13 am
Ok one more question related to this thread:
Why a=="java"; gives true?
The operator == checks whether or not the 2 variables point to the same object or not. "java" is not a reference variable to nothing is just the content. Why does it work that way?
Thanks in advance.
The_Nick.
Why a=="java"; gives true?
The operator == checks whether or not the 2 variables point to the same object or not. "java" is not a reference variable to nothing is just the content. Why does it work that way?
Thanks in advance.
The_Nick.