0
Which collection one should choose in case when we need output in a descending format?and Why?
There is a black box to whom input is a stream of distinct integers and I need output in descending sorted format which is the ideal collection for it and why?
1 Respuesta
+ 1
I think sorted set is what you after
https://docs.oracle.com/javase/7/docs/api/java/util/SortedSet.html It contains only distinct elements in some order.