Im having a garbage output i wanted to add two arrays using function

i wanted to add two arrays using function and im getting garbage vallue is there any mistake here is my code

public class SumArrays {
public static int[] sum(int arr1 [],int arr2[])
{
Scanner s=new Scanner(System.in);
int n=s.nextInt();
int[] sumArray=new int[n];
for(int i=0;i<n;i++)
{
sumArray[i]=arr1[i]+arr2[i];
}
return sumArray;
}

public static void main(String[] args) {
	Scanner s=new Scanner(System.in);
	int n=s.nextInt();
	int arr1[]=new int[n];
	for(int i=0;i<n;i++)
	{
		arr1[i]=s.nextInt();
	}
	int arr2[]=new int[n];
	for(int i=0;i<n;i++)
	{
		arr2[i]=s.nextInt();
	}
	int[] sums=sum(arr1,arr2);
	System.out.println(sums);
}

}

Hey @missroy As you are trying to print
System.out.println(sums);
You can not directly print Array Like this because this will only print Address of that array.So you have to make a loop which prints each element separately like this.
for(int I = 0;i < sums.length; i++{
System.out.println(sums[i]);
}