In the conditional statements, the conditions are evaluated in the order they are placed. Always try to take advantage of this one. For instructions which require more processing time, place them at the end. For Large Scale enterprise applications, it is common to add new Features and remove old features. Also It makes its lower to load the class at runtime.
Vector provides the following methods to insert elements.
The way these methods work is , all the elements are moved down between the insertion point and the end of the vector, making space for the new Element. The same works for deleting element at a Particular index. If possible, if these features are required, then try to use a different Data Structure if possible. If the approximate size of the Vector is know initially then use it. The way the Vector is expanded is, a new Vector of double the size of current Vector is created, all the Elements in the old Vector is copied to the new Vector and then the old Vector is discarded.