You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 7, 2026. It is now read-only.
Repository navigation
Commit d2e36b9
Browse filesBrowse the repository at this point in the historyBrowse files
Array-Ausgabe wie in Java: Referenz statt Inhalt, Arrays.toString zeigt den Inhalt
System.out.println(zahlen) gibt in der Simulation und in Programmieren jetzt wie
echtes Java eine Referenz wie [I@… aus. Arrays.toString und Arrays.deepToString
zeigen den Inhalt; Arrays braucht import java.util.Arrays (Code-Export ergänzt ihn).
Lektion 15 erklärt das in de/en/pt.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ugz28VVb2pkKNmmHKgsfxu
Copy file name to clipboardExpand all lines: web/lessons/de/15-arrays.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,8 @@ for (int i = 0; i < zahlen.length; i++) {
166
166
- Ein leeres Array mit 5 Fächern legst du mit `new int[5]` an.
167
167
-`zahlen[i]` ist das Fach mit dem Index `i`, `zahlen.length` die Länge.
168
168
169
+
Gibst du das ganze Array aus, also `System.out.println(zahlen);`, zeigt Java nicht die Zahlen. Du siehst nur einen Text wie `[I@1b6d3586`. Das ist die **Referenz**, also die Stelle, an der das Array im Speicher liegt. Den Inhalt zeigt erst `Arrays.toString(zahlen)`, das ergibt `[2, 4, 6, 8, 10]`. Dafür schreibst du ganz oben `import java.util.Arrays;`.
Copy file name to clipboardExpand all lines: web/lessons/en/15-arrays.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,8 @@ for (int i = 0; i < numbers.length; i++) {
166
166
- You create an empty array with 5 slots with `new int[5]`.
167
167
-`numbers[i]` is the slot with index `i`, `numbers.length` is the length.
168
168
169
+
If you output the whole array, that is `System.out.println(numbers);`, Java does not show the numbers. You only see a text like `[I@1b6d3586`. This is the **reference**, the place where the array is stored in memory. `Arrays.toString(numbers)` shows the content: `[2, 4, 6, 8, 10]`. For this you write `import java.util.Arrays;` at the very top.
Copy file name to clipboardExpand all lines: web/lessons/pt/15-arrays.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -166,6 +166,8 @@ for (int i = 0; i < numeros.length; i++) {
166
166
- Um array vazio com 5 posições cria-se com `new int[5]`.
167
167
-`numeros[i]` é a posição com o índice `i`, `numeros.length` é o comprimento.
168
168
169
+
Se mostrares o array inteiro, ou seja `System.out.println(numeros);`, o Java não mostra os números. Só vês um texto como `[I@1b6d3586`. É a **referência**, o sítio onde o array está guardado na memória. O conteúdo só aparece com `Arrays.toString(numeros)`, que dá `[2, 4, 6, 8, 10]`. Para isso escreves `import java.util.Arrays;` logo no início.
0 commit comments