Java: “Anonymous” array in for-each-loop August 20, 2023 by Tarik This will work: for (String crt : new String[]{"a","b","c"} ) { doSomething(); }