public static String[] removeString (String[] original) {
String[] newString;
List<String> list = new ArrayList<String>(Arrays.asList(original));
list.remove(0);
newString = list.toArray(original);
return newString;
}
I'm trying to use the above code to remove the first string from an array of strings; however, it seems that although I do succeed in removing the first string from the array, I also made the last string in the array null. How can I make the array itself shorter?