Runtime Polymorphism
1. Polymorphism
1) compile time polymorphism
- You overload static method in java
2) runtime polymorphism
2. Runtime Polymorphism(Dynamic Method Dispatch)
- Process in which a call to an overridden method is resolved at runtime rather than compile-time
- an overridden method is called through the reference variable of a superclass
3. Upcasting
- When reference variable of Parent class refers to the object of Child class, It is known as upcasting
4. Runtime Polymorphism example
- 8,9
5. Runtime Polymorphism with data member
- Runtime polymorphism can't be achieved by data members
- 0
'Back-End > Java_1' 카테고리의 다른 글
[Java] Instanceof (0) | 2016.09.09 |
---|---|
[Java] Static Binding and Dynamic Binding (0) | 2016.09.08 |
[Java] Final keyword (0) | 2016.09.07 |
[Java] Instance initializer block (0) | 2016.09.07 |
[Java] Super keyword (0) | 2016.08.25 |