devxlogo

October 15, 2018

Understanding Collections.reverse() in Java

A list with a set of values can be reversed using the reverse() method. import java.util.*; public class ReverseACollection{ public static void main(String[] args) { List dataList = new ArrayList();