Given an array of n Objects, let\'s say it is an array of strings, and it has the following values:
foo[0] = \"a\"; foo[1]
An alternative in Java 8:
String[] filteredArray = Arrays.stream(array) .filter(e -> !e.equals(foo)).toArray(String[]::new);