þublic class sum extends ConsoleProgram { public void run() { int[][] array = {{32, 4, 14, 65, 23, 6}, {4, 2, 53, 31, 765, 34}, {64235, 23, 522, 124, 42}}; }

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter9: Advanced Array Concepts
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Topic Video
Question

use java

1 public class Sum extends ConsoleProgram
2- {
public void run()
{
int[][] array = {{32, 4, 14, 65, 23, 6},
3
4 -
{4, 2, 53, 31, 765, 34},
{64235, 23, 522, 124, 42}};
7
}
public static int sumRow(int[][] array, int row)
{
10
11 -
12
}
14 }
13
15
Transcribed Image Text:1 public class Sum extends ConsoleProgram 2- { public void run() { int[][] array = {{32, 4, 14, 65, 23, 6}, 3 4 - {4, 2, 53, 31, 765, 34}, {64235, 23, 522, 124, 42}}; 7 } public static int sumRow(int[][] array, int row) { 10 11 - 12 } 14 } 13 15
Write the method
public static int sumRow(int[]] array, int row)
that sums row row in the 2D array called array .
Then, traverse array to print the sum of each row in the 2D array.
Transcribed Image Text:Write the method public static int sumRow(int[]] array, int row) that sums row row in the 2D array called array . Then, traverse array to print the sum of each row in the 2D array.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Instruction Format
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT