Added till 18th

This commit is contained in:
Aditya Tiwari
2026-02-12 15:07:02 +05:30
parent d3a9111632
commit 0d16f1cde6
31 changed files with 200 additions and 0 deletions

16
TreeSet18b.java Normal file
View File

@@ -0,0 +1,16 @@
// write a java code to demonstrate treeset
import java.util.*;
public class TreeSet18b {
public static void main(String args[]){
TreeSet<String> home = new TreeSet<String>();
home.add("Hall Room");
home.add("Bed Room");
home.add(null);
home.add("Bed Room");
home.add("Kitchen");
Iterator<String> itr = home.iterator();
while(itr.hasNext()){
System.out.println(itr.next());
}
}
}