Question: Class Template import java.util.HashSet; public class FindSum { public static void main(String args[]) { int[] arr = { 1, 5, 4, 6, 7, 9 };

![main(String args[]) { int[] arr = { 1, 5, 4, 6, 7,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4676807d66_28766f46767869ef.jpg)
Class Template import java.util.HashSet; public class FindSum { public static void main(String args[]) { int[] arr = { 1, 5, 4, 6, 7, 9 }; HashSet res = findSums (arr); System.out.println(res.toString()); } // Should return (6,5,7,9] public static HashSet findSums (int[] elements) { HashSet sums = new HashSet(); // To Initialize a hashtable HashSet hashtable = new HashSet(); // To add "newItem" to hashtable hashtable.add(newItem); // To check if "item" exist in hashtable hashtable.contains (item); return sums; } } Given an array of unique positive integers, write a function findSums that takes the array input and: 1. Creates a hashtable called hashT and inserts all the elements of the input array in the hashtable. 2. Finds pairs of elements in the hashtable whose sum is another element (sum) in the hashtable and print the pairs in the console. 3. Returns another hashtable names "sums of those sum elements. For example: Input: [1,5,4,6,7,9] Output: [6,5,7,9] Explanation: 6 = 1 + 5 ; 5 = 1 + 4 ; 7 = 1 + 6 ; 9 = 5 + 4 Class Template