Hi,
can it be possible ,two different object have same hashcode?
Depends on which object you are talking about and what is the implementation of hashcode() method for that object.
as i know hashCode is unique no which is generated by jvm during object creation based on the address of an object to provide uniqueness.
Yes, that's correct. But that is about the jvm implementation for the java's Object class. It can always be overriden and its upto the overriding class to make sure that its implementation is unique. Look at the jdk code of java's String class to see one such override. And, yes , you can always just do a "return 1" in the overriden hashcode() method in your class. But that violates the basic principle of having a unique hashcode to differentiate between objects. Hope this clarifies.
~Lokesh.