import javax.swing.*;
import java.util.Locale;

 public class array1D  
 {
 public static void main(String[] args)
 {
     int a1[]={1,2,3,4,5,6};
     int a2[]={1,4,9,16,25,36};
     int a3[]=new int[a2.length];
     String s="array1 output : ";
     String s1="a1 =\n"+output(a1);
     s1+="a2 = \n"+output(a2);
     for(int i=0;i<a1.length;i++) {a3[i]=a1[i]*a2[i];}
     s1+="a3 = a1*a2 \n"+output(a3);
     JOptionPane.showMessageDialog(null,s1,s,JOptionPane.PLAIN_MESSAGE);
}
 public static String output(int a[])
 {
 Locale tr=new Locale("TR");
 int x=25;
 String s1="";
   for(int i=0;i<a.length;i++)
    { s1+=String.format(tr," %10d ",a[i]);}
   s1+="\n";
   return s1;
 }
 
 }
