Question: Part 2: A method for NavigableSet Take a look at the NavigableSet interface. It adds a new method subSetto the methods already provided by Set.




Part 2: A method for NavigableSet Take a look at the NavigableSet interface. It adds a new method subSetto the methods already provided by Set. The subSet method requires that keys stored in the NavigableSet have a total order. Therefore, you'll see that the generic type is constrained to be a Comparable. The Comparable interface provides the compareTo method public interface NavigablesetT extends ComparableT extends Set
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
