I am not sure if an object's identity is it's location in the internal memory or a reference value that points towards its state.
Could someone please explain what it actually is?
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
I am not sure if an object's identity is it's location in the internal memory or a reference value that points towards its state.
Could someone please explain what it actually is?
Where did you hear that term? I've not heard it.
If you don't understand my answer, don't ignore it, ask a question.
How did the author define the term?
If you don't understand my answer, don't ignore it, ask a question.
Conceptual ideas such as objects and state/behavior are denoted to refer to a class files behavior or methods. Such as a person is a noun and is considered an Object in Java. In other terms it is a noun. In Java, these nouns have conceptual ideas called class files. Its components or behaviors are termed what is their attributes are. I think the term identity may be used interchangeably with a person(real life) and such as here, a conceptual Object or idea.
"All object variables are reference types, which mean they don't actually contain the data like primitive data types do. Instead, they point to the data, which is another an other area of internal storage"
"An object's identity is its address in internal memory, which is always unique."
These 2 description were in separate chapters. Could the identity be a reference value to another reference value or what?
"An object's identity is its address in internal memory, which is always unique."
That looks like the author's definition.
If you don't understand my answer, don't ignore it, ask a question.
I have no idea what you are trying to say.
The author said:
"An object's identity is its address in internal memory"
Everything in a computer is located at some address. The above seems to say that the author defines the address as the "identity".
If you don't understand my answer, don't ignore it, ask a question.
Object identity: Objects can contain or refer to other objects.
Identity is a property of an object that distinguishes the object from all other objects in the application.
There are many techniques for identifying objects in programming languages, databases and operating systems.
Identity: Identity means it is the same object instance while equality means the objects you compare are to different instances of an object but happen to contain
the same data.
I Think, It is very effective answer for clear their doubts in Java Programming course.
Thanks!!!