Guidewire Interview Question

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