This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
|
java:loop_statements [2015/09/18 10:51] gthanos [For statement] |
java:loop_statements [2017/01/26 10:20] gthanos [Εντολές ανακύκλωσης] |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Εντολές ανακύκλωσης ====== | + | ====== Εντολές |
| ===== While και do-while statements ===== | ===== While και do-while statements ===== | ||
| Line 36: | Line 36: | ||
| public static void main(String[] args){ | public static void main(String[] args){ | ||
| int[] numbers = {1, | int[] numbers = {1, | ||
| - | for (int i; i< | + | for (int i=0; i< |
| System.out.println(" | System.out.println(" | ||
| } | } | ||
| Line 49: | Line 49: | ||
| public static void main(String[] args){ | public static void main(String[] args){ | ||
| int[] numbers = {1, | int[] numbers = {1, | ||
| - | for (int item : numbers) { | + | for (int item : numbers) { // for every item in numbers array |
| System.out.println(" | System.out.println(" | ||
| } | } | ||
| Line 55: | Line 55: | ||
| } | } | ||
| </ | </ | ||
| + | |||
| + | | Προηγούμενο: | ||
| + | Εντολές τερματισμού και ελέγχου της ανακύκλωσης ]] | | ||