I am making a program based on string processing in Java in which I need to remove duplicate strings from a string array. In this program, the size of all strings are same.
This will work
array = new HashSet(Arrays.asList(array)).toArray(new String[0]);
or just use a HashSet instead of an array.
HashSet