-
What is Dynamic binding?
- 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.
- cannot convert from Parent to Child.
- Child activity can't access the parent, but the parent activity can access the Child class.
- Then, override method we can access the child and parent class, it's called as dynamic binding.
- 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)