package day12;
import java.util.ArrayList;
import java.util.List;
import java.util.Stack;
import java.util.Vector;
public class VecTest03 {
public static void main(String[] args) {
Vector v = new Vector();
v.add(10);
v.add("hello");
v.add(3.14);
v.add(new Point(1,2));
System.out.println(v);
System.out.println(v.get(0));
Object o = v.get(1);
String str = (String)o;
System.out.println(str.length());
Object o2 = v.get(3);
System.out.println(o2);
if(o2 instanceof Point) {
Point p = (Point)o2;
System.out.println(p.getX());
System.out.println(p.getY());
}
List list = new ArrayList();
list = new Vector();
list = new Stack();
}
}