I have two arrays
String[] ID1={\"19\",\"20\",\"12\",\"13\",\"14\"}; String[] ID2={\"10\",\"11\",\"12\",\"13\",\"15\"};
How can I get
It looks like XOR operation ;)
Please describe your needs a little bit more directly. Pseudocode:
foreach s in ID1 { if(ID2.contains(s)) { ID2.remove(s) } else { ID2.add(s) } }
ID2 will contain your result. In assumption that there are not duplicates in both arrays.