answersLogoWhite

0


Best Answer

Possibly. It could also mean that the two references are referring to two different Objects, which contain the same data.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: If two references are having same hashcodes is that mean those two are refering to same object?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Can a nested object be used in Serialization?

Yes, provide that object and its object references (the instance variables of that object that are of other object types) is also Serializable, or marked as [NonSerialized]


Why is an array of reference not possible?

Unlike pointer variables and other variables, references have no storage of their own. A reference is simply an alias for an object that already exists in memory (allowing you to refer to the object by its memory address). Since they have no storage of their own it is impossible to create an array of references. You can of course create an array of objects, each of which can then be referenced. You can also have several references to the same object. But you cannot store those references because there is nothing to physically store other than the object itself, which is already stored. For the same reason you cannot reference references nor can you point to references. You can only refer and point to objects (or point to NULL of course).


What is unicast remote object in java?

The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive. The UnicastRemoteObject class provides support for point-to-point active object references (invocations, parameters, and results) using TCP streams.


What are the condition which can cause an object to be garbage collected?

A Java object is ready to be garbage collected if there are no active references to the object. Let us say you declare an object of type ArrayList inside a for loop and process it. That object is local to the for loop and once the loop is executed there are no open references to the array list. Hence after the method is executed this object would be eligible to be garbage collected. The JVM garbage collector would search for such unused/unreferenced objects and clear them.


What is the diff between equality of objects and equality of references that refer to them?

References are equal if they both point to the same object. o2); // true because they are meaningfully equal System.out.println(o1.equals(o2)); } } Meaningfully equal is defined by overriding the equals method of class Object. boolean equals (Object obj) Decides whether two objects are meaningfully equivalent.

Related questions

What is the difference between reference and hash code in java?

Cat oldCat = new Cat(); Cat newCat = new Cat(); Cat oldCatRef = oldCat; In the above example, oldCat and oldCatRef are references to the same object. Since they refer to the same object, their hashcodes will be equal. But oldCat and newCat do not refer to the same object. They are references to two different objects. But they might have the same hashCode based on their implementation. hashCode is simply a method in Object class which you can override.


What resolves references from object code files and libraries file?

References are resolved by their offset within the data segment.


Can a nested object be used in Serialization?

Yes, provide that object and its object references (the instance variables of that object that are of other object types) is also Serializable, or marked as [NonSerialized]


What is symbolic data type for computer?

Typically, for references to data stored in memory on a given system, a reference 6 Symbolic references; 7 References in object oriented languages.


Why is an array of reference not possible?

Unlike pointer variables and other variables, references have no storage of their own. A reference is simply an alias for an object that already exists in memory (allowing you to refer to the object by its memory address). Since they have no storage of their own it is impossible to create an array of references. You can of course create an array of objects, each of which can then be referenced. You can also have several references to the same object. But you cannot store those references because there is nothing to physically store other than the object itself, which is already stored. For the same reason you cannot reference references nor can you point to references. You can only refer and point to objects (or point to NULL of course).


When the number of references to an object becomes that object is marked for garbage collection?

When the object is no longer referenced anywhere else in your program, then the object becomes marked for garbage collection.


What was The precious object from the sea to which he compared the kingdom of god?

He waas refering to the coin of Ceaser earthly money and kihgdom.


How do you delete reference of an object?

This often happens automatically, when the variable that references an object goes out of scope. Alternatively, you can set the variable that refers to an object to some reserved value, such as NULL (details vary, depending on the programming language).This often happens automatically, when the variable that references an object goes out of scope. Alternatively, you can set the variable that refers to an object to some reserved value, such as NULL (details vary, depending on the programming language).This often happens automatically, when the variable that references an object goes out of scope. Alternatively, you can set the variable that refers to an object to some reserved value, such as NULL (details vary, depending on the programming language).This often happens automatically, when the variable that references an object goes out of scope. Alternatively, you can set the variable that refers to an object to some reserved value, such as NULL (details vary, depending on the programming language).


What is unicast remote object in java?

The UnicastRemoteObject class defines a non-replicated remote object whose references are valid only while the server process is alive. The UnicastRemoteObject class provides support for point-to-point active object references (invocations, parameters, and results) using TCP streams.


What does Nonogonal mean?

Not sure about nonogonal, but nonagonal means refering to, or of a nonagon which is a plane object with 9 straight sides and 9 vertices.


What are the condition which can cause an object to be garbage collected?

A Java object is ready to be garbage collected if there are no active references to the object. Let us say you declare an object of type ArrayList inside a for loop and process it. That object is local to the for loop and once the loop is executed there are no open references to the array list. Hence after the method is executed this object would be eligible to be garbage collected. The JVM garbage collector would search for such unused/unreferenced objects and clear them.


What do you mean by this keyword in java?

"this" is a Java keyword that references the current object. Any part of the object(instance variables, methods, constructors) can be accessed by calling this.[member].