Answers for "java collection reverse order"

6

how to reverse a list in java

List<String> stringList = Arrays.asList("A", "B", "C");
    Collections.reverse(stringList);
    assertThat(stringList).containsExactly("C", "B", "A");
Posted by: Guest on March-19-2020
3

Collections reverse on java

//import java.util.Collections;
//create and add items to list
Collectons.reverse(list);
Posted by: Guest on September-06-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language