Professional Documents
Culture Documents
initComponents();
int xa [] = new int [4];
int ya [] = new int [4];
xa[0]=
xa[1]=
xa[2]=
xa[3]=
10;
20;
30;
40;
ya[0]=
ya[1]=
ya[2]=
ya[3]=
1;
2;
3;
4;
addition (xa,ya);
}
public void subtraction (int c1[], int c2[])
{
int c3[] = new int [4];
for (int i=0;i<4;i++)
{
c3[i]= c1[i] - c2[i];
}
JOptionPane.showInputDialog(""+c3[0]+","+c3[1]+","c3[2]+","+c3[3]);