Skip to content

Instantly share code, notes, and snippets.

@JoshuaFox
Created August 14, 2022 18:29
Show Gist options
  • Save JoshuaFox/946f061ad435d9706f93a8af44590c1e to your computer and use it in GitHub Desktop.
Save JoshuaFox/946f061ad435d9706f93a8af44590c1e to your computer and use it in GitHub Desktop.
Java loop
public static List<Integer> main() {
List<Integer> result = new ArrayList<>();
for (int i = 0; i < 4; i++) {
result.add(i * i);
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment