public static void main(String[] args)
{
int[] a = {1,2,4,5,8};
int[] b = {2,3,4,5,9};
Test test = new Test();
System.out.println(test.arrAdd(a, b));
}
public int[] arrAdd(int[] a,int[] b)
{
int temp;
int[] outArry = new int[a.length];
for(int i=0;i<=b.length/2;i++)
{
temp = b[i];
b[i]=b[b.length-1-i];
b[b.length-1-i]=temp;
}
for(int j=0;j<a.length;j++)
{
outArry[j]=a[j]+b[j];
}
return outArry;
}