MainClass.java Source code

Java tutorial

Introduction

Here is the source code for MainClass.java

Source

import java.util.Enumeration;
import java.util.Vector;

public class MainClass {
    public static void main(String args[]) throws Exception {
        Vector v = new Vector();
        v.add("a");
        v.add("b");
        v.add("c");

        Enumeration e = v.elements();
        while (e.hasMoreElements()) {
            Object o = e.nextElement();
            System.out.println(o);
        }
    }
}