IntStream to sum a 2D array
<p>What is the syntax for using IntStream to sum a range of elements in a 2D array? </p>

<p>For a 1D array, I use the following syntax: </p>

<pre><code>int totalElementsInArray = 0;

totalElementsInarray = IntStream.of(myArray).sum();
</code></pre>

<p>So for instance, say I have a 2D array:</p>

<pre><code>int[][] my2DArray = new int[17][4];
</code></pre>

<p>What is the syntax when using IntStream for summing columns 0-16 on row 0?</p>

<pre><code>int totalElementsInArray = 0;

totalElementsInarray = IntStream.of(my2DArray[0 through 16][0]).sum();
</code></pre>