Java Program to Find The Maximum Element in Each Row of a Matrix

In this post we’ll see a Java program to find the maximum element in each row of a matrix.

For example if there is a matrix as given below-

10 8 6
0  13 7
17 3 15

Then program should find the maximum element for each row in the matrix as follows-

Maximum element in row-1 = 10
Maximum element in row-2 = 13
Maximum element in row-3 = 17

Java program – Finding max element in each row of a matrix

Output

That’s all for the topic Java Program to Find The Maximum Element in Each Row of a Matrix. If something is missing or you have something to share about the topic please write a comment.


You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.