/hashset Secret
Created
October 26, 2020 14:16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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