Skip to content

Instantly share code, notes, and snippets.

@michalkowol
Created November 29, 2014 15:56
Show Gist options
  • Select an option

  • Save michalkowol/e9e5f3f87338ddec829e to your computer and use it in GitHub Desktop.

Select an option

Save michalkowol/e9e5f3f87338ddec829e to your computer and use it in GitHub Desktop.
class ClassMain {
private val mainVar = "Main"
showMeTheMain()
protected def showMeTheMain() {
println(mainVar)
}
}
class ClassA extends ClassMain {
private val a = "qwerty"
showMeTheMain()
override def showMeTheMain() {
println("not main anymore" + a.toUpperCase())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment