Pregunta de entrevista de Amazon

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