I have lists in an arraylist(2 dimensional), elements are recurrent in lists. I would like to search for a specified element and replace the second element after it in all the lists.
Example - I search for 154 and 358, so zeros should be changed to 1:
This code do it only for one match, not for all matches.
Example - I search for 154 and 358, so zeros should be changed to 1:
[288, 362, 0, 365, 85, 0, 137, 10, 0, 154, 358, 1]
[285, 226, 0, 137, 10, 0, 20, 30, 1, 387, 297, 0, 154, 358, 1]
This code do it only for one match, not for all matches.