import javax.swing.*;
class H8Ex5 { 
public static void main(String args[] ) 
{ double A[][]={{1.0,2.0},{3.0,4.0}}; 
  double B[][]={{1.0,1.0},{1.0,1.0}}; 
  matrix M[]=new matrix[3];
  M[0]=new matrix(A); 
  M[1]=new matrix(B); 
  M[2]=matrix.add(M[0],M[1]);  
  String s="First Matrix = \n"+M[0].toString(); 
  s+="Second Matrix = \n"+M[1].toString();   
  s+="addition of two matrices : \n"+M[2].toString(); 
  String s1="Array example: class matrix";
  JOptionPane.showMessageDialog(null,s,s1,JOptionPane.PLAIN_MESSAGE); 
} }