Solved

Select an Appropriate Declaration to Complete the Following Code Segment

Question 43

Multiple Choice

Select an appropriate declaration to complete the following code segment, which is designed to read strings from standard input and display them in increasing alphabetical order, excluding any duplicates. Select an appropriate declaration to complete the following code segment, which is designed to read strings from standard input and display them in increasing alphabetical order, excluding any duplicates.    A) LinkedList<String> words = new LinkedList<>() ; B) Set<String> words = new TreeSet<>() ; C) Set<String> words = new Set<>() ; D) Set<String> words = new HashSet<>() ;


A) LinkedList<String> words = new LinkedList<>() ;
B) Set<String> words = new TreeSet<>() ;
C) Set<String> words = new Set<>() ;
D) Set<String> words = new HashSet<>() ;

Correct Answer:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions