Comparing two java objects on fly (data type not known)
- by Narendra
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