Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
import java.util.List;
public class Loops {
public static void main(String[] args) {
List<String> list = List.of("a", "b");
for (String s : list) {
System.out.println(s);
}
for (int i = 0; i < 10; i++) {
System.out.println("i=" + i);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment