Comparing two java objects on fly (data type not known)

Posted by Narendra on Stack Overflow See other posts from Stack Overflow or by Narendra
Published on 2010-12-31T10:48:55Z Indexed on 2010/12/31 10:54 UTC
Read the original article Hit count: 255

Filed under:
|
|
|

Hi All,

I need to compare different data objects.

Can any one tell me how can i do this. I don't know what are the data types i will get priorly. If i need to use any util from apache commons then please give reference to it.

At present I am using .equals() for comparing equality of objects .It is working fine when I am comparing quality for two strings. If i am comparing java.sql.date data type then it is showing unequal even though both contains same values.

Can any one suggest me on this regard.

Thanks,
Narendra

© Stack Overflow or respective owner

Related posts about java

Related posts about compare