Skip to content

Instantly share code, notes, and snippets.

@mim-Armand
Last active August 29, 2015 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mim-Armand/42e8900a5aa3dca12f54 to your computer and use it in GitHub Desktop.
Save mim-Armand/42e8900a5aa3dca12f54 to your computer and use it in GitHub Desktop.
Changing Array length in processing works in contrary to Java that changin an Arrays length is impossible after it's creation (Although I assume in Processing it's returning a new array under the hood but it says something else though in the documentations!)
String[] sa1 = { "OH ", "NY ", "CA "};
println(sa1); // --> OH, NY, CA
println(sa1.length); // --> 3
sa1 = shorten(sa1);
println(sa1); // --> OH, NY
println(sa1.length); // --> 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment