Guys, tell me pliz how to implement a method for exchanging the values of the specified and the next item in the list.
There is no such method. You can manually set the values on the indexes through the set
Sorry, I lied to you. Use Collections.swap .