Lernpfad:Objektorientierte Programmierung mit Java/Arrays: Unterschied zwischen den Versionen

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 102: Zeile 102:
|-
|-
!Index
!Index
| 0 || || 2 || 3 || 4 || 5
|width="30px"|0
|width="30px"|1
|width="30px"|2
|width="30px"|3
|width="30px"|4
|width="30px"|5
|}
|}
2.
2.
Zeile 110: Zeile 115:
|-
|-
!Index
!Index
| 0 || || 2 || 3 || 4 || 5
|width="30px"|0
|width="30px"|1
|width="30px"|2
|width="30px"|3
|width="30px"|4
|width="30px"|5
|}
|}
3. Das Array hat die Größe 6, daher sind gültige Indizes für die Elemente 0,1,2,3,4,5. Die Zuweisung <code>zahlen[6] = zahlen[6]</code> erzeugt daher einen Fehler.
3. Das Array hat die Größe 6, daher sind gültige Indizes für die Elemente 0,1,2,3,4,5. Die Zuweisung <code>zahlen[6] = zahlen[6]</code> erzeugt daher einen Fehler.
Zeile 119: Zeile 129:
|-
|-
!Index
!Index
| 0 || || 2 || 3 || 4 || 5
|width="30px"|0
|width="30px"|1
|width="30px"|2
|width="30px"|3
|width="30px"|4
|width="30px"|5
|}
|}
5.
5.
Zeile 127: Zeile 142:
|-
|-
!Index
!Index
| 0 || || 2 || 3 || 4 || 5
|width="30px"|0
|width="30px"|1
|width="30px"|2
|width="30px"|3
|width="30px"|4
|width="30px"|5
|}
|}
6.
6.
Zeile 135: Zeile 155:
|-
|-
!Index
!Index
| 0 || || 2 || 3 || 4 || 5
|width="30px"|0
|width="30px"|1
|width="30px"|2
|width="30px"|3
|width="30px"|4
|width="30px"|5
|}
|}
6.
6.
Zeile 143: Zeile 168:
|-
|-
!Index
!Index
| 0 || || 2 || 3 || 4 || 5
|width="30px"|0
|width="30px"|1
|width="30px"|2
|width="30px"|3
|width="30px"|4
|width="30px"|5
|}
|}
{{Lösung:End}}
{{Lösung:End}}