Lecture3 Loops, Arrays
1. Good programming style¶
The goal of good style is to make your code more readable, by you and by others.
- Use meaningful names
- Use indentation
- Use whitespaces
- Do not duplicate tests
2. Loops¶
Loop operators allow to loop through a block of code.
| Java | |
|---|---|
3. Arrays¶
An array is an indexed list of values and all elements of an array must have the same type.
The index starts at zero and ends at length-1
