Capgemini Interview Question

Print duplicate elements in an arraylist?