1 | Elements are created with the addElement( ... ) method: |
2 | Order missouri = new Order(); |
3 | orders.addElement( missouri ); |
4 | The object missouri of type Order is automatically converted to an Object and added to Vector instance orders defined on the previous foil. |
5 | There are methods for indexing vectors. Like arrays, the indexing is zero-based. |
6 | x = (Typeofx) v.elementAt(i); |
7 | v.setElementAt( x, i ); |
8 | The length of the Vector may also be obtained: |
9 | int size = v.size; |