Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Vector;

public class Main {
    public static void main(String[] args) {
        // create an empty Vector vec with an initial capacity of 6     
        Vector vec = new Vector(6);

        vec.add(33);
        vec.add(34);
        vec.add(22);
        vec.add(11);
        vec.add(22);
        vec.add(12);

        // let us remove the 1st element
        System.out.println("Removed element: " + vec.remove((Integer) 22));

        System.out.println(vec);
    }
}