Skip to content

Instantly share code, notes, and snippets.

@togi
Created November 24, 2010 16:26
Show Gist options
  • Save togi/713921 to your computer and use it in GitHub Desktop.
Save togi/713921 to your computer and use it in GitHub Desktop.
public class Foo {
private int foo;
public void test() {
final int bar;
int baz;
new Runnable() {
void run() {
foo = 0; // ok, can both read and write
bar = 0; // fail, can only read
baz = 0; // fail, can neither read or write
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment