Skip to content

Instantly share code, notes, and snippets.

@Ribesg
Created August 21, 2013 09:46
Show Gist options
  • Save Ribesg/6292496 to your computer and use it in GitHub Desktop.
Save Ribesg/6292496 to your computer and use it in GitHub Desktop.
public class TestClass {
public void method() {
// 1
}
public void someOtherMethod() {
new Runnable() {
@Override
public void run() {
this.method(); // Refers to 2
method(); // Refers to 2, too
TestClass.this.method(); // Refers to 1 !
}
public void method() {
// 2
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment