Sum of two arrays

help me with sum function of two arrays
import java.util.*;
public class Main {
public static void main (String args[]) {
Scanner sc = new Scanner(System.in);
int N = sc.nextInt();
int [] arr = new int[N];
for(int i = 0; i<arr.length;i++)
{
arr[i] = sc.nextInt();
}
int M = sc.nextInt();
int [] arr1 = new int [M];
for(int j = 0;j<arr1.length;j++)
{
arr1[j] = sc.nextInt();
}
sum(arr,arr1);

}
public static int[] sum(int [] arr1, int[] arr2)
{
	int arr3[] = new int[];
	
}

}

hey @Naman_Gupta You did nothing, please write your logic

help me with the code and logic thats what i am asking

@Naman_Gupta
1.Traverse both the arrays simultaneously from the end until we reach the 0th index of either of the array.
2.While traversing each element of array, add an element from both arrays and carry from the previous sum.
…………2.1 Store the unit digit of the sum(obtained by doing - sum%10) in the ans array.
…………2.2 forward carry(obtained by doing - sum/10) for the next index sum.
3.After the loop ends we are left with one of the arrays and the carry.
4.We will now repeat step 2 but now for one array which is left after the loop.
5.If carry !=0 then store the carry in the 0th index of ans array.
6.Print the ans array .
If you are not able to write a code. I will help
Try yourself first