Excecute multiple arrays in one line?

@jb4x’s for ( ; ; ) loop example can be turned into 1 single statement too: :innocent:

final int[] example = new int[10]; // 10 indexed integer values

void setup() {
  //java.util.Arrays.fill(example, 0, 4, 999); // assign value 999 to indices 0 to 3
  for (int i = 0; i < 4; example[i++] = 999); // assign value 999 to indices 0 to 3
  println(example);
  exit();
}
6 Likes