Prior to Java 8, which introduced lambdas, variables used with anonymous classes were required to be final. That restriction is now relaxed as the compiler can infer it.
Interestingly, the for-each loop variable is effectively final, unless you explicitly modify it, so this code is legal (and correct):
for (String v : values) {
executor.execute(() -> System.out.println(v));
}