Skip to content

Instantly share code, notes, and snippets.

@MarkMenard
Created October 8, 2010 20:36
Show Gist options
  • Save MarkMenard/617489 to your computer and use it in GitHub Desktop.
Save MarkMenard/617489 to your computer and use it in GitHub Desktop.
class A {
def foo = "A"
def printFoo () {
println foo
}
}
class B extends A {
def foo = "B"
def printFoo () {
super.printFoo()
println foo
}
}
b = new B ()
b.printFoo()
// Outputs
// A
// B
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment