We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6307824 commit 0b0e056Copy full SHA for 0b0e056
Code_Examples/Print_Using_For_Loop.java
@@ -0,0 +1,11 @@
1
+public class Main {
2
+ public static void main(String[] args) {
3
+ int[] numbers = {10, 20, 30, 40, 50};
4
+
5
+ // Using a for loop to print elements
6
+ System.out.println("Using for loop:");
7
+ for (int i = 0; i < numbers.length; i++) {
8
+ System.out.println("Element at index " + i + ": " + numbers[i]);
9
+ }
10
11
+}
0 commit comments