Skip to content

Instantly share code, notes, and snippets.

@mike-solomon
Created January 25, 2023 20:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mike-solomon/cdb8cb02a64f016ef225bf03a4d25bd1 to your computer and use it in GitHub Desktop.
Save mike-solomon/cdb8cb02a64f016ef225bf03a4d25bd1 to your computer and use it in GitHub Desktop.
import java.util.function.Consumer;
class A {
void test() {
Consumer<String> a = b -> {
int c = 0;
};
a = new Consumer<String>() {
@Override
public void accept(String s) { }
};
}
}
@mike-solomon
Copy link
Author

Without the super call, line 6 of int c = 0 will not have the final modifier added to it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment