Skip to content

Instantly share code, notes, and snippets.

@vamsitallapudi
Created December 5, 2020 09:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vamsitallapudi/f34f5ea99e8ed272b296714bcdd3fa49 to your computer and use it in GitHub Desktop.
Save vamsitallapudi/f34f5ea99e8ed272b296714bcdd3fa49 to your computer and use it in GitHub Desktop.
open class Bird{
fun makeSound(){}
fun fly() {}
}
class Eagle : Bird()
class Penguin : Bird() // fails LSP because it cannot fly therefore has different behaviour and cannot call fly() method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment