How to find the pairs of numbers from an array whose sum is divisible by 9

This is the first solution to find the pairs of numbers in which their sum is divisible by 9 from an array of integers. This method uses the core logic of traversing array using nested for loops, add any two numbers in each iteration, and then verify that the sum is divisible by 9.

import java.util.ArrayList;
import java.util.List;

public class SumpairsDivby9 {

	public static List<Integer> divby9(int[] tempArr) {

		List<Integer> answerPairs=new ArrayList<Integer>();

		System.out.println("The hardcoded array of integers given below");
		System.out.print("[ ");
		for(int i=0;i<tempArr.length;i++)
			System.out.print(tempArr[i]+" ");
		System.out.println("]");
		//Traverse through the array using nested for loop, and check whether the sum of the successive numbers divisible by 9
		for (int i=0;i<tempArr.length;i++) {
			for(int j=i+1;j<tempArr.length;j++) {
				int sum = tempArr[i]+tempArr[j];
				if (sum%9==0) {
					answerPairs.add(tempArr[i]);
					answerPairs.add(tempArr[j]);			
				}		
			}
		}
		return answerPairs;
	}

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		int[] intArr= {14,20,7,16,25,34,4};
		System.out.println("OUTPUT:");

		//Calling the function divby9 which computes the sum of pairs divisible by 9
		List<Integer> retPairs=divby9(intArr);

		System.out.println("The pairs of numbers which are divisible by 9");
		for(int i=0;i<retPairs.size();i+=2)
			System.out.println(retPairs.get(i)+"    "+retPairs.get(i+1));
	}
}
OUTPUT:
 The hardcoded array of integers given below
 [ 14 20 7 16 25 34 4 ]
 The pairs of numbers which are divisable by 9
 14    4
 20    7
 20    16
 20    25
 20    34