Driver Code
public static void main ( String [ ] args ) { int [ ] array = { 3 , 2 , 1 , 4 , 5 , 2 , 1 , 7 , 8 , 9 } ; Vector < Integer > v = new Vector < > ( ) ; for ( int i : array ) { v . add ( i ) ; }