Now in section Inheritance mainly in Hiding And Overriding Methods Can we predict the output of the following program? 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 [...]
Archive | August 7th, 2008
Static keyword in Java
August 7, 2008
What is Static? static variables and static methods might better have been called perClass variables and methods. They inherited this misleading terminology from C++. They are the opposite of instance variables and methods that work on a particular object. Can we predict the output of the program? 1 2 3 4 5 6 7 8 [...]
Decorator Design Pattern
August 7, 2008
Intent of Decorator Design Pattern: Attach additional responsibilities to an object dynamically.Decorators provide a flexible alternative to subclassing for extending functionality.[GoF,p175] Client specified embellishment of a core object by recursively wrapping it. Wrapping a gift,putting it in a box and wrapping the box. Problem:You want to add behavior or state to individual objects at runtime.Inheritance [...]






August 7, 2008
0 Comments