Amazon Interview Question

Please write a java code that print duplicates of an array.