We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Is there a way to set all the values in an array at once with one line of code? I want to make something where if ENTER is pressed then all the values in an array are set to 255.
Thanks
Answers
You would have to use a loop
You can use the fill() method from java.util.Arrays (you will have to import it first).
Here's a short sample code:
note: printArray() was introduced in Processing 2.1