Skip to content

Commit dfc741e

Browse files
June LeeJune Lee
authored andcommitted
coniditons and loops
1 parent 7a10bb5 commit dfc741e

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

  • control-flow-and-collections/chapter-example/student-example/src/main/java/org/launchcode
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package org.launchcode;
2+
3+
public class ForEach {
4+
public static void main(String [] args) {
5+
int nums[] = {1, 1, 2, 3, 5, 8, 13, 21};
6+
7+
for (int i : nums) {
8+
System.out.println(i);
9+
}
10+
}
11+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package org.launchcode;
2+
3+
public class Loops {
4+
public static void main(String[] args) {
5+
for (int i = 0; i < 10; i++) {
6+
System.out.println(i);
7+
}
8+
}
9+
}

0 commit comments

Comments
 (0)