Posts

Showing posts with the label Storing data in Collection

Storing Different types of value in TreeSet

Image
Hi Friends, Basically TreeSet is used to store similar type of data, but by using comaparator we cam implement our own logic to store different types of objects.  Lets Check, Storing Value in TreeSet of 2 Different type of Objects, by comparing their Address, Also if Address matches, it is then compared on the based on name and further Id.. Logics can be further modified.