13
devk
8y

Polymorphism (Object Oriented) explained better :

1) Father : Son, go and get Red Label.

Son : Full or Half? ..

2) Mother : Son, go and get Red Label.

Son : 100g or 250g? ..

Comments
  • 0
    Don't get it...
  • 1
    @SecondThread the same son was called by mum and dad to do the same thing but replies differently to both.

    same with polymorphism, you may call the same class/method two or more times but want it to do things that are inherently the same from one another but at the same time different.

    I think.
  • 1
    More like the son called the "askRedLabelMeasurements()" on the Parent implementation
  • 0
    haha, well I wasnt too sure, really.
  • 1
    red label is tea as well as drink brand...dad asks ans is drink....mom asks its tea
Add Comment