Last active
July 3, 2026 06:52
-
-
Save up1/5d6bb0b8710c3c6a9c00b8dd8b7b5b95 to your computer and use it in GitHub Desktop.
Hello Java
This file contains hidden or 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
| import static java.lang.IO.print; | |
| import static java.lang.IO.println; | |
| void main() { | |
| int[] arr = {1, 2, 3, 4, 5}; | |
| // For each | |
| for (int i : arr) { | |
| print(i + " "); | |
| } | |
| println(); | |
| // Stream API | |
| Arrays.stream(arr).forEach(i -> print(i + " ")); | |
| println(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment