public static String [ ] copyArrayAddFirst ( String [ ] arr , String add ) { String [ ] arrCopy = new String [ arr . length + 1 ] ; arrCopy [ 0 ] = add ; System . arraycopy ( arr , 0 , arrCopy , 1 , arr . length ) ; return arrCopy ; }
Utility function that copies a string array and add another string to first