Guidewire interview question

To remove duplicate elements from an array in Java and return a new array with just the unique elements.