Answers for "java list swap 2 elements"

0

java list swap 2 elements

String a = words.get(0);
words.set(0, words.get(words.size() - 1));
words.set(words.size() - 1, a)
Posted by: Guest on June-03-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language