how to reverse a list in java

‮‬www.lautturi.com
how to reverse a list in java
/**
 * @author lautturi.com 
 * Java example: reverse a list in java
 */

import java.util.*;

public class Lautturi {
	public static void main(String[] args) {
        List<String> list = Arrays.asList("hello","lautturi","java","python","world");

		System.out.println(list);
		Collections.reverse(list); 
		System.out.println(list);
	}
}

output:

[hello, lautturi, java, python, world]
[world, python, java, lautturi, hello]
Created Time:2017-10-07 22:44:07  Author:lautturi