Static Binding and Dynamic Binding
1. Binding
- Connecting a method call to the method body is known ad binding
1) static binding(early binding)
2) dynamic binding(late binding)
2. Static binding
- When type of the object is determined at compiled time, is is known as static binding
- If there is any private, final or static method in class, there is static binding
3. Dynamic binding
- When type of the object is determined at run-time, it is known as dynamic binding
- Object type can't be determinded by the compiler, because the instance of Dog is also an instance of Animal, so Compiler doesn't know its type
'Back-End > Java_1' 카테고리의 다른 글
[Java] Abstract class (0) | 2016.09.12 |
---|---|
[Java] Instanceof (0) | 2016.09.09 |
[Java] Runtime Polymorphism (0) | 2016.09.08 |
[Java] Final keyword (0) | 2016.09.07 |
[Java] Instance initializer block (0) | 2016.09.07 |