Are static members inherited to sub classes?
Answer / Ishant Tyagi
"Static members are not directly inherited by subclasses in Java, but they can be accessed through the superclass reference. Static members belong to the class instead of the instance, so they have their own existence independent of any objects created from the class. If a subclass defines its own static member with the same name as a static member in its superclass, then the subclass's static member hides the superclass's static member."
| Is This Answer Correct ? | 0 Yes | 0 No |
what is difference between Exception and Error?
How do you sort an array in java?
What interface is extended by awt event listeners?
Why collection is called framework in java?
Explain importance of finally block in java?
What is an arraylist in java?
What is outofmemoryerror in java?
What is flush buffer?
What is an object in Java and what are its benefits?
what is stringtolennizer with example?
How do you define a parameter?
What is the relationship between class and object?