document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2.  * HashSetContoh
  3.  * @author (Fika Nur Aini)
  4.  * @version (22 Oktober 2020)
  5.  */
  6.  
  7. import java.util.*;
  8. class HashSetContoh
  9. {
  10.     public static void main(String args[])
  11.     {
  12.         HashSet<String> al = new HashSet<String>();
  13.         al.add("Anto");
  14.         al.add("Budi");
  15.         al.add("Cecep");
  16.         al.add("Dani");
  17.         al.add("Eka");
  18.        
  19.         Iterator<String> itr = al.iterator();
  20.         while(itr.hasNext())
  21.         {
  22.             System.out.println(itr.next());
  23.         }
  24.     }
  25. }
');