//Program to multiply two given matrices. import java.util.Scanner; public class MatrixMultiplication { public static void main(String args[]) { Scanner reader = new Scanner(System.in); System.out.print("\nEnter the row size of first matrix, row1: "); int row1 = reader.nextInt(); System.out.print("\nEnter the column size of first matrix, col1: "); int col1 = reader.nextInt(); System.out.print("\nEnter the row size of second matrix, row2: "); int row2 = reader.nextInt(); System.out.print("\nEnter the column size of second matrix, col2: "); int col2 = reader.nextInt(); if(col1 == row2) { //code to input first matrix int matrix1[][] = new int[row1][col1]; System.out.print("\nEnter the first matix -----------"); for(int i=0; i