I have to write a code that makes it possible to delete all the words of a SortedSet starts with K.
import java.util.*;
public class Deleter {
public static void deleteKWords(SortedSet<String> set) {
set.subSet("K", "");
}
}
}
I've heard that with a subSet can simple solved but i couldn't.