public static void main(String args[])
{
float a[][]={{1,2,3},{4,5,6}}; //2*3
float b[][]={{1,2},{3,4},{5,6}}; //3*2
float c[][]=new float[2][2];
for(int i=0;i<2;i++)
{
for(int j=0;j<2;j++)
{
c[i][j]=0;
for(int k=0;k<3;k++)
{
c[i][j]+=a[i][k]*b[k][j];
}
System.out.print(c[i][j]+" ");
}
System.out.println();
}
}