Javatpoint Logo
Javatpoint Logo

Java Program to add two matrices

We can add two matrices in java using binary + operator. A matrix is also known as array of arrays. We can add, subtract and multiply matrices.

Add two matrices in Java

To subtract two matrices, use - operator. Let's see a simple example to add two matrices of 3 rows and 3 columns.

Test it Now


2 6 8
4 8 6
4 6 9
Next TopicJava Programs

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA