Frage im Vorstellungsgespräch bei OptionsHouse

Java: There is an array of integers which may have duplicate values. Create an array which only has unique values from the first array (no duplicates)

Antwort im Vorstellungsgespräch

Anonym

17. Nov. 2016

Integer[] str = new Integer[] { 1, 2, 3, 1, 2, 3, 1, 2, 3 }; List ls = Arrays.asList(str); Set s = new HashSet(ls);