Created
April 9, 2020 12:08
-
-
Save mevsungur/85032359fece122d998d59dda8360911 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
public static void main(String[] args) { | |
List<String> isimler = new ArrayList<>() {{ | |
add("Mevlüt"); | |
add("Sungur"); | |
add("Java"); | |
add("Angular"); | |
}}; | |
Iterator<String> iterator = isimler.iterator(); | |
while (iterator.hasNext()) { | |
String isim = iterator.next(); | |
if (isim.startsWith("S")) { | |
isimler.remove(isim); | |
} | |
} | |
isimler.stream().forEach(System.out::println); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment