Need Solution | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Need Solution

//converting Hashset to treeset Set<String>tree = new TreeSet<String>(n); System.out.println("TreeSet elements:"); for(String element : tree){ System.out.println(element); } showing error ⤵️ https://code.sololearn.com/cLVS6gH9m9cP/?ref=app

28th Oct 2022, 1:28 PM
Mustakim Rahman
Mustakim Rahman - avatar
2 Answers
+ 2
Mustakim Rahman You need to import Set interface Or do util.*; to import all interfaces and class
28th Oct 2022, 1:32 PM
A͢J
A͢J - avatar
+ 2
Thanks
28th Oct 2022, 1:33 PM
Mustakim Rahman
Mustakim Rahman - avatar