The problem is that since your new array is smaller than the old, the new array is copied in the old. The remaining fields are filled with zero. This is ugly, but will solve your problem:
public static String[] RemoveString (String[] Original) {
List<String> list = new ArrayList<String>(Arrays.asList(Original));
list.remove(0);
return list.toArray(new String[0]);
}
change Or do what God said, his code is better.
edit 2 Changes to post a comment below
source
share