What is the result of compilation and execution of the following code:

import java.util.*;
class Main {
  public static void main(String[] args) {
    List<String> list = Arrays.asList("a", "b", "c", "d", "e");
    NavigableSet<String> set = new HashSet<String>(list);
    
    System.out.println("Less d: " + set.lower("d"));
    System.out.println("Greater b: " + set.higher("b"));
  }
}

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback
Cosmo
Sign Up Now
or Subscribe for future quizzes