Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@soudmaijer
Created April 8, 2021 10:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save soudmaijer/6f4fda1e7aa832c9f0de71b4b0a17ef0 to your computer and use it in GitHub Desktop.
Save soudmaijer/6f4fda1e7aa832c9f0de71b4b0a17ef0 to your computer and use it in GitHub Desktop.
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