import javax.swing.*;
class H8Ex7 { 
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}; 
  vector M1=new vector(A); 
  vector M2=new vector(B); 
  M1.add(M2);  
  String s="summation of two vector : \n"+M1.toString(); 
  String s1="class vector";
  JOptionPane.showMessageDialog(null,s,s1,JOptionPane.PLAIN_MESSAGE); 
} }