Java says a static method cannot be overridden because static method is Class level method.
Then why cant the above justification apply for inheritance.Why a static method is inherited.
Please justify.
static methods can be overridden by static method in sub class if you override in nonstatic method compiler complines you the error overridden method is static..
santhosh.R gowda wrote:
static methods can be overridden by static method in sub class if you override in nonstatic method compiler complines you the error overridden method is static..