Created
August 14, 2022 18:29
-
-
Save JoshuaFox/946f061ad435d9706f93a8af44590c1e to your computer and use it in GitHub Desktop.
Java loop
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 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