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.

Results 1 to 10 of 10

Thread: What is an object's identity?

  1. #1
    Junior Member
    Join Date
    Apr 2014
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default What is an object's identity?

    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?


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: What is an object's identity?

    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.

  3. #3
    Junior Member
    Join Date
    Apr 2014
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: What is an object's identity?

    Quote Originally Posted by Norm View Post
    Where did you hear that term? I've not heard it.
    It is from a book called murach's Java Programming.

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: What is an object's identity?

    How did the author define the term?
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Member
    Join Date
    Dec 2013
    Location
    Honolulu
    Posts
    83
    Thanks
    1
    Thanked 4 Times in 2 Posts

    Default Re: What is an object's identity?

    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.

  6. #6
    Junior Member
    Join Date
    Apr 2014
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: What is an object's identity?

    Quote Originally Posted by Norm View Post
    How did the author define the term?
    "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?

  7. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: What is an object's identity?

    "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.

  8. #8
    Junior Member
    Join Date
    Apr 2014
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: What is an object's identity?

    Quote Originally Posted by Norm View Post
    "An object's identity is its address in internal memory, which is always unique."
    That looks like the author's definition.
    So would you agree that an object's identity is it's reference value to the reference value to its state or value such as a String's text?

  9. #9
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,162
    Thanks
    65
    Thanked 2,725 Times in 2,675 Posts

    Default Re: What is an object's identity?

    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.

  10. #10
    Junior Member
    Join Date
    Oct 2018
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: What is an object's identity?

    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!!!

Similar Threads

  1. Replies: 2
    Last Post: September 26th, 2013, 04:13 PM
  2. read & write object in object file
    By amirsarem in forum What's Wrong With My Code?
    Replies: 1
    Last Post: June 8th, 2013, 11:35 AM
  3. Help with Identity matrix!
    By javabeginner123456 in forum What's Wrong With My Code?
    Replies: 0
    Last Post: April 9th, 2011, 06:42 PM
  4. Reading from ResultSet to Object and from object Object Array
    By anmaston in forum What's Wrong With My Code?
    Replies: 4
    Last Post: April 7th, 2011, 06:11 AM