MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Random;

public class MainClass {
    public static void main(String args[]) {
        String s[] = { "A", "B", "C", "D", "E", "H", "I" };
        List list1 = Arrays.asList(s);
        List list2 = Arrays.asList(s);
        Random rand = new Random(100);
        Collections.shuffle(list1, rand);
        Collections.shuffle(list2, rand);
        System.out.println(list1);
        System.out.println(list2);
    }
}