So I have 4 arrays in which each array contains names. The array either returns an array of name or null. the names are unique in an array but that name may appear in different arrays. Some arrays may be null. An example:
E.g.
Array 1 = [Bob, Sam, Mary, Jake];
Array 2 = [Sam, Jacob, Tom];
Array 3 = null; Array 4= [Stephanie, Sam] etc
What I want to do is to get all the strings that are common in ALL the arrays. This is what I'm thinking of: check if the arrays is null and then put the arrays that are not null in an array called, 'notNull'. And then loop through each individual element (which are an array) in notNull and then store the names that are common in the array in a variable. So in this current example, Sam should be printed out.
Sambe printed if array 3 doesn't contain it?