| Author |
Decorator Pattern
|
Maan Suraj
Ranch Hand
Joined: Dec 20, 2007
Posts: 285
|
|
I was going through decorator pattern from Head First. On one of the pages,it says that
" When i inherit behaviour by subclassing,that behaviour is set statically at compile time"
I am not getting what does "statically at compile time means in this context".
|
Man Suraj
Someone says "Impossible is nothing". The man next him says "Let me see you licking your elbow tip!"
|
 |
ramesh maredu
Ranch Hand
Joined: Mar 15, 2008
Posts: 206
|
|
I read it long back,if I am correct, the book is comparing between inheritance and composition.
When you extend a class and make a subclass then you get the behavior of super class and the behavior is static (you can not change the behavior at runtime). But if you compose then the behavior you get with composed reference could be dynamic.
|
SCJP 1.5 94%.
The greatest glory in living lies not in never falling, but in rising every time we fall.
|
 |
 |
|
|
subject: Decorator Pattern
|
|
|