Question: Create a new class named ArrayOperator that has the following methods: 1. public T[] combine(T[]...arrays) - this method does the following: Accepts multiple T

Create a new class named ArrayOperator that has the following methods: 1. public T[] combine(T[]...arrays) - this method does the following: Accepts multiple T arrays Retrieve the values from each input arrays Put the unique values to the output array 2. public T[] common (T[]...arrays) - this method does the following: Accepts multiple T arrays Retrieve the values from each input arrays Put the common values to the output array 3. public static void main(String[] args) - this method does the following: Create three Integer arrays to store the following values respectively: i. {1, 5, 6, 8, 12,} ii. (2,5, 7, 9, 15, 16} iii. {1, 5, 6, 7, 12, 15, 19} Create an instance of the ArrayOperator Call the combine method of the array operator to get the unique values from that three Integer arrays Print the values stored in the returned array Call the common method of the array operator to get the common values from that three arrays. Print the values stored in the returned array
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
