Friday, May 13, 2016

vector in java

package com.home;

import java.util.Iterator;
import java.util.Vector;

public class VectorDemo {

public static void main(String[] args) {

Vector obj = new Vector();

obj.add(12);
obj.add("ram");
obj.add(1);



//System.out.println(obj);

/* Iterator it = obj.iterator();

while(it.hasNext()){
System.out.println(it.next());
}
*/

for(int i=0;i<obj.size();i++){

System.out.println(obj.get(i));
}

}

}


The Output of the Following Program is:
12
ram
1

1 comment:

  1. Las Vegas - Casino & Resort Fee - JetBlue
    The hotel charges a stay at 3131 Las Vegas Blvd. 안양 출장샵 South, Las Vegas NV 89109. 논산 출장마사지 This hotel is 광주광역 출장샵 free, and the 충청북도 출장안마 following amenities are available to 천안 출장안마

    ReplyDelete