Is it possible to subtract 2 String arrays to produce a new array? In the following code, I am calling to Methods I wrote for other Array operations. I want to create a new array using the results of those Methods. I need to create the new array in one line of code.
Since this is a HW assignment, I am not looking for the code to be written for me. Just a little direction.
static String[] xor( String[] set1, String[] set2 )
{
    set1 = (union(set1, set2) - intersection(set1, set2)); 
    return set1; 
}
 
     
     
     
     
    