Array Multiplication Program
package arrays;
import [Link];
public class Multiplication {
private int [][] array1 = new int [3][3];
private int [][] array2 = new int [3][3];
private int [][] array3 = new int [3][3];
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner([Link]);
Multiplication M = new Multiplication ();
int x;
int y;
int a;
int b;
[Link]("Enter the numbers for the first 3x3 array");
for (x = 0; x < 3; x++){
for(y = 0; y < 3; y++){
M.array1[x][y] = [Link]();
}
}
[Link]("Enter the numbers for the second 3x3 array");
for (a = 0; a < 3; a++){
for(b = 0; b < 3; b++){
M.array2[a][b] = [Link]();
}
}
for (x = 0; x < 3; x++){
for (y = 0; y < 3; y++){
for (a = 0; a < 3; a++){
M.array3[x][y] = M.array3[x][y] + M.array1[x][a] * M.array2[a][y];
}
}
}
[Link]("The matrix after product is:");
for ( a = 0; a < 3; a++){
for ( b = 0; b < 3; b++){
[Link](M.array3[a][b] +" ");
}
[Link]("\n");
}
}
}