Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.ArrayList;
import java.util.Collections;

public class Main {
    public static void reverseMethod() {

        ArrayList<String> list = new ArrayList<String>();
        list.add("Z");
        list.add("A");
        list.add("K");
        list.add("N");
        System.out.println(list);
        Collections.reverse(list);
        System.out.println(list);

    }
}