Guest User

Untitled

a guest
Jun 18th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. import java.util.*;
  2. public class bar {
  3. public static void main(String[] args) {
  4. HashSet <string> hs1 = new HashSet <string>();
  5. hs1.add("Cemal Sureya");
  6. hs1.add("Nazim Hikmet");
  7. hs1.add("Turgut Uyar");
  8. hs1.add("Orhan Veli");
  9. hs1.add("Sabahattin Ali");
  10. hs1.add("Sabahattin Ali");
  11. hs1.add("Sabahattin Ali");
  12.  
  13. System.out.println("Yazarlarin HashSet ile Sirasiz Hali:" +hs1);
  14.  
  15. TreeSet <string> trees1= new TreeSet <string> (hs1);
  16. System.out.println("TreeSet ile Alfabetik Sirali Hali:" + trees1);
  17.  
  18. }
  19. }
  20.  
  21. /*
  22. www.yazilimkaravani.net
  23. Ali Murat Çevik - 2018
  24. */
Add Comment
Please, Sign In to add comment