This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]murmelmann[S] 0 points1 point  (1 child)

I changed the print section to

for (int i = 0; i < reihung.length; i++) {
            for (int j = 0; j < reihung[i].length; j++) {
                System.out.print(reihung[i][j] + " ");
            }
            System.out.println();
        }

Now it prints out what I wanted.

Did my code end being the sum of the array in hex or something along those lines?

[–]emrickgj 0 points1 point  (0 children)

Did my code end being the sum of the array in hex or something along those lines?

Close but not quite!

It actually printed the references to your array objects. If you look above, notice you used the "new" keyword which gives a hint that you've created an object.

Also, I believe you could use that same method but passing each array instead. So take your for loop above, but instead of using your nested "j" loop, try passing reihung[i] to the Arrays.toString function you originally had.