PwC interview question

Write a code to remove duplicates in a array in java