In Java, I want to extract the differences from one comma-separated string when compared to another.
e.g
The string I want to extract the differences from: 1,hello,fire,dog,green
The string I am comparing with : 1,hello,water,dog,yellow
So the result of the function would give me a arraylist of [3,fire] and[5,green] as those items are different than the items in the second string, which are 'water' and 'yellow'. The numbers are the index positions of each item detected to be a difference. The other items match and are not considered.