Java Program to add two matricesLast Updated : 17 Mar 2025 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. ![]() To subtract two matrices, use - operator. Let's see a simple example to add two matrices of 3 rows and 3 columns. Test it NowOutput: 2 6 8 4 8 6 4 6 9 Next TopicJava Programs |
We request you to subscribe our newsletter for upcoming updates.

We deliver comprehensive tutorials, interview question-answers, MCQs, study materials on leading programming languages and web technologies like Data Science, MEAN/MERN full stack development, Python, Java, C++, C, HTML, React, Angular, PHP and much more to support your learning and career growth.
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India
