{{announcement.body}}
{{announcement.title}}

# Java Quiz 18: Multidimensional Arrays

DZone 's Guide to

# Java Quiz 18: Multidimensional Arrays

### Let's take a look at the answer to our last quiz (dealing with Arrays) before jumping into this week's puzzle, which tackles working with multidimensional Arrays.

· Java Zone ·
Free Resource

Comment (5)

Save
{{ articles[0].views | formatCount}} Views

Before we start with this week's quiz, here is the answer to Java Quiz 17: Working With Arrays

The expression to the left of the brackets is fully evaluated before any part of the expression within the brackets is evaluated.

1. We can simplify the statement `System.out.print(arrA[(arrC = arrB)[(arrA = arrC)[4]]]);` as `System.out.print(arrA[arrB[arrB[4]]]);`.
2. arrB[4] = 5, arrB[5] = 4. arrA[4] = 6

## Here Is the Java Puzzle for Today!

Write one statement on line 11 to print the element with the value of 18 to the standard output.

``````public class MyArray
{
public static void main(String[] args)
{
int[] array[][] = {
null,
{{1, 2, 3, 4, 5}},
new int[3][],
{{6, 7, 8, 9, 10, 11}, {12, 13, 14, 15}, {16, 17, 18, 19}}
};
// line 11: Write your statement here!
}
}``````

The correct answer and its explanation will be included in the next quiz in two weeks! For more Java quizzes, puzzles, and assignments, take a look at my site!

Topics:
arrays ,java ,java quiz ,multidimensional arrays

Comment (5)

Save
{{ articles[0].views | formatCount}} Views

Opinions expressed by DZone contributors are their own.