MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class MainClass {
    public static void main(String[] args) {
        List list = new ArrayList();
        for (int i = 0; i < 10; i++)
            list.add("");
        Collections.fill(list, "Hello");
        System.out.println(list);
    }
}
//