Class Java Script
Sunday, 21 April 2013
Class -10-
package net.dharmaraj;
import java.util.*;
public class TechnoSample {
public static void main(String args[]) {
Vector col = new Vector();
col.add(new Integer(1));
col.add(new Integer(2));
col.add(new Float(3.2d));
col.add(col.elementAt(0));
System.out.println(col.elementAt(0));
col.setElementAt(col.elementAt(2), 0);// setElementAt(Object,Index)
System.out.println(col);
}
}
Answer:-
1
[3.2, 2, 3.2, 1]
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment