Skip to content

Instantly share code, notes, and snippets.

@nadiatiaraa
Created October 26, 2020 14:16
import java.util.*;
class HashSetContoh
{
public static void main(String args[])
{
HashSet<String> al=new HashSet<String>();
al.add("Anto");
al.add("Budi");
al.add("Cecep");
al.add("Dani");
al.add("Eka");
Iterator<String> itr=al.iterator();
while(itr.hasNext()) {
System.out.println(itr.next());
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment