Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
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
You can’t perform that action at this time.