How to shuffle only some elements in ArrayList
and fix the remaining elements
I have an ArrayList
which contains locked and unlocked values I want to shuffle only the unlocked elements and fix the locked elements.
I have followed this Java: Exclude array index in shuffle now my unlocked array list get shuffled but i have noticed that some elements get their same index while shuffling my requirement is that every element has to get different index in array list after shuffling i.e original array list element index must not match with shuffled array list elements index