posted 18 years ago
The method follows the principle of Overriding ( i,e the getBill method ), it is resolved at run time.
The second method is a static method( i,e printAll( ) ) which gets resolved at compile time therefore the output.
Important Note:
Static methods are resolved at compile time, therefore cannot be overridden .