Skip to content

Instantly share code, notes, and snippets.

@uncoded-ro
Created January 12, 2020 06:52
Show Gist options
  • Save uncoded-ro/16f819653bc860f7df865e98ba3e02e0 to your computer and use it in GitHub Desktop.
Save uncoded-ro/16f819653bc860f7df865e98ba3e02e0 to your computer and use it in GitHub Desktop.
package ro.virtualcampus.set;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
public class AppSetForEach {
public static void main(String args[]) {
String nume[] = {"Ioana", "Ghita", "Maria"};
Set<String> multime = new HashSet<String>(Arrays.asList(nume));
for (String element : multime)
System.out.println(element);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment