DEV Community

velvizhi Muthu
velvizhi Muthu

Posted on

Module 3:Dynamic binding

  1. What is Dynamic binding?

    1. In general, an object can be created using the same class name, but it is possible to create an object using two different class names. It's called a Dynamic binding.
    2. cannot convert from Parent to Child.
    3. Child activity can't access the parent, but the parent activity can access the Child class.
    4. Then, override method we can access the child and parent class, it's called as dynamic binding.
    5. Only the same class name can be used on the "new" keyword.

Example:
Parent pa = new Parent
instead of
Parent pa = new Child or Child ch =new Parent.

Top comments (0)