Skip to content

Instantly share code, notes, and snippets.

@greatman
Created April 29, 2013 22:25
Show Gist options
  • Save greatman/5485296 to your computer and use it in GitHub Desktop.
Save greatman/5485296 to your computer and use it in GitHub Desktop.
import java.util.Arrays;
/**
* Created with IntelliJ IDEA.
* User: william
* Date: 13-04-29
* Time: 18:20
* To change this template use File | Settings | File Templates.
*/
public class TestClass {
public static void main(String[] args) {
String[] entry = new String[30];
entry[0] = "0";
entry[1] = "1";
entry[2] = "2";
System.out.println(Arrays.toString(entry));
String[] newArray = Arrays.copyOfRange(entry, 1, entry.length - 1);
System.out.println(Arrays.toString(newArray));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment