Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

how to reverse a list in java

    List<String> stringList = Arrays.asList("A", "B", "C");
    Collections.reverse(stringList);
    assertThat(stringList).containsExactly("C", "B", "A");
 
PREVIOUS NEXT
Tagged: #reverse #list #java
ADD COMMENT
Topic
Name
6+2 =