Capgemini Engineering interview question

Write a code to remove duplicate from an array.

Interview Answer

Anonymous

Jan 17, 2019

Integer[] a= {1,2,2,3,4,4,5,7,7}; HashSeth=new HashSet(); for(int i:a) { h.add(i); } System.out.println(h); }