Coders Packet

Interchange the First and Last Row of Matrix in Java

By Akansha Janardhan Khandale

Java program to interchange the first and last row of given matrix, here in this code Interchange function is used for swapping and then we get the desired matrix.

In this packet of code, we give input matrix and after running this code the full first row elements are interchanged with last row elements.

In this Java code ,Interchange function is used where interchanging process take place and then in the main function we give input matrix and call Interchange function and then we get the desired matrix.


For Example: Given Input matrix: 4  8  10  15


                                                  2  3  19  7


                                                  1  9    2   5

                                                  13  25  1   6


New matrix: 13  25  1   6


                   2  3  19  7


                   1  9    2   5


                   4  8  10  15

Download project

Reviews Report

Submitted by Akansha Janardhan Khandale (Sandhya2008)

Download packets of source code on Coders Packet