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.
a == "java"
Moderator: admin
a == "java"
Last edited by admin on Sun Mar 10, 2013 10:23 am, edited 1 time in total.
Reason: removed qid reference
Reason: removed qid reference
-
- Site Admin
- Posts: 10074
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1212 :
The actual content "java" is stored at a location, this location address is compared to a.
Please don't take it wrong way but the questions that you are asking are really basic. You should first study from a good book such as "Thinking in Java". It will help you a lot.
I can only give you brief explanation but you need a continuous development of concepts, which can be done only by reading a book.
thank you,
Paul.
Please don't take it wrong way but the questions that you are asking are really basic. You should first study from a good book such as "Thinking in Java". It will help you a lot.
I can only give you brief explanation but you need a continuous development of concepts, which can be done only by reading a book.
thank you,
Paul.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: No registered users and 23 guests