1
In PHP there is the method array_diff()
which verifies values of two arrays and returns the items referring to the difference between them. For example:
$arrExclusion = array('as', 'coisas', 'acontece', 'no', 'tempo', 'certo');
$arr = array('tudo', 'as', 'coisas' 'acontece', 'me', 'é', 'no', 'lícito',
'mas', 'seu', 'nem', 'tudo', 'tempo', 'me', 'convém', 'certo' );
$new_array = array_diff($arr, $arrExclusion);
The values of array $new_array
evening:
''everything', 'me', 'me', 'lawful', 'but', 'not', 'all', 'me', 'it suits'
Is there any method equivalent to array_diff()
in JAVA? If yes, which one? If not, how could I perform this procedure?
http://stackoverflow.com/questions/1235033/java-comparing-two-string-arrays-and-removing-elements-that-exist-in-both-array
– user28595