Created
November 24, 2010 16:26
-
-
Save togi/713921 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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