I have string array like this:
String[] s={"0010", "0110", "1010", "1110", "0001", "0011"}
I need to get each pairs of elements which changed inside array. In this case, only one element out of 4 gets changed for every string.
For the example: for 0010, as the first position(0) change to 1 on 1010, I need to print out
{"0010","1010"}
for 0001, as the third position(0) change to 1 on 0011, I need to print out
{"0001", "0011"}
and so on. Is there any way in java to get this result and how? Is this same to get string inside string array?
Strings? As posted, your code line doesn't compile. Also, can you elaborate a bit, maybe show us what you have tried yourself?String[] s={"0010", "0110","1010","1110"," 0001"," 0011"}. I think this is the valid String Array