Wednesday, 25 January 2017

Vector : GetSet


import java.util.Vector;

public class GetSet {

    public static void main(String[] args) {
        // TODO Auto-generated method stub


        Vector<String> v = new Vector<>();
        v.add("v1");
        v.add("v2");
        v.add("v3");
        v.add("v4");
       
        System.out.println("Full List : "+v);
        System.out.println("get(index) : "+v.get(2));
        System.out.println("v.set(1,'&&&&') : "+v.set(1,"&&&&"));
        System.out.println("Full List : "+v);
       
    }
}

No comments:

Post a Comment