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[]) {
        Vector<String> v = new Vector<String>();
        v.add("A");
        v.add("B");

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