Skip to content

Instantly share code, notes, and snippets.

@BrainKu
Created October 3, 2014 01:44
Show Gist options
  • Select an option

  • Save BrainKu/e98c1bc5f109eef61744 to your computer and use it in GitHub Desktop.

Select an option

Save BrainKu/e98c1bc5f109eef61744 to your computer and use it in GitHub Desktop.
something about private
class AB {
private int ab = 1;
public AB() {
System.out.println(this.getClass().getSimpleName());
System.out.println(this.ab);
System.out.println(((ABC)this).ab);
}
}
class ABC extends AB {
public int ab = 100;
public ABC() {
System.out.println(ab);
}
public static void main(String[] args) {
new ABC();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment