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