-
-
Save uncoded-ro/16f819653bc860f7df865e98ba3e02e0 to your computer and use it in GitHub Desktop.
This file contains 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
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