I am trying to do swa the bits but i have string which contains binary that is at first index[1] =1001 and at second index[2]=0010
I want TO swap there bits like
1001 and 0010 after bits swaps it becomes 1010 and 0001 and so on.
for example
A (array in string)
1. 1001
2. 0011
3. 1010
4. 0101
.
.
.
now I want to swap the 1st two bits of 1 st string with 2nd string last 2 bits then 1st strings bit with 3rd so on
result :
1011
0001
1000
1011
I also applied this:
String array[] = gf.split("\\", -1);
but did not succeed
I just need to split the String into array. So just need help, thank you very much :)