I guess there's some sorta miscommunication!It is not a way to return a single element by a special magic!
The way I understood is that this exotic syntax filters out a specific element from a returned array.
Now you just say that it's not a way to return a single element?
I did an example below, and it doesn't compile b/c
it cannot convert an int (a single element) into an int[] (a whole array)!
And your 2nd example doesn't filter out anything. So, nothing exotic there!
void setup() { int[] a; // regular expected access: a = getArray(); println(a); // cannot convert int to int[]: a = getArray()[1]; println(a[1]); exit(); } int[] getArray() { return new int[] {-2, 34, 5}; }