Didn't we go through this exact question just a short while ago?
The answer is no. All your example did was add a single int to a Vector object. The Vector would still not be able to hold more than one int. You could create a whole new class call IntCollection based on the Collection interface that does hold ints in an array.
As far as your questions about when an error occurs, you can download the
Java J2SE from Sun and try it yourself.
[This message has been edited by Thomas Paul (edited April 26, 2001).]