Last active
August 29, 2015 14:02
-
-
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!)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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