import java.util.Vector; public class MainClass { public static void main(String[] argv) { Vector<MyClass> myVec; myVec = new Vector<MyClass>(); MyClass myClass = new MyClass(); myVec.add(myClass); myClass = myVec.get(0); } } class MyClass { }