Created
September 13, 2014 07:54
-
-
Save jimwhite/8755a8a7e9263f5a2154 to your computer and use it in GitHub Desktop.
This file contains 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
package org.ifcx.snippets; | |
/** | |
* Created by jim on 9/13/14. | |
*/ | |
public class Foo { | |
protected int x; | |
int getX() { return x + 1; } | |
} |
This file contains 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
package org.ifcx.snippets | |
class Bar extends Foo { | |
void doJob() { | |
println x | |
println super.x | |
println super.@x | |
} | |
} | |
Bar b = new Bar() | |
b.@x = 1 | |
b.doJob() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment