Originally posted by Gurudhaasan:
use equals() method
Gurudhaasan, you are (as in the "programmer,developr" post) incorrect. The
equals method tests if two objects are the same.. but in the case with
employees they are the same if they have the same value. Please consider
your postings.. and remember to state if your not 100% sure that your
answer is correct.
vijayk gopu: Each employee should have unique ename i.e. String and unique ecode
vijayk gopu: what should I write in equals()?
You have actually answered your own question
if a unique employee id
identified by a a unique String and a unique integer, how would you
implement an equalily check, i.e. when two objects are identical (have the
same values) ?
Happy coding
/Svend Rost, who'll check back later