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) {
        Vector<Integer> firstvec = new Vector<Integer>(4);
        Vector<Integer> secondvec = new Vector<Integer>(4);

        // additing in firstvec
        firstvec.add(4);
        firstvec.add(3);
        firstvec.add(2);

        // additing in secondvec
        secondvec.add(4);
        secondvec.add(3);
        secondvec.add(2);

        // let us print all the elements available in vector
        System.out.println("Testing equality of firstvec and secondvec :" + firstvec.equals(secondvec));

    }
}