Is there a way to make the TreeSet sorted by the time of entering the keys not by the value itself
i mean if 
TreeSet a= new TreeSet() ;   
a.add("Zenda") ;   
a.add("Apple") ;  
then i printed the treeSet
i want to have "Zenda" then "Apple"
not sorted lexicographically .
 
    