Monday, April 07, 2025

LATEST UPDATES
>> What is the difference between continue and break statement?  >> What is a singleton class? Give a practical example of its usage.  >> What’s the purpose of Static methods and static variables?  >> What are the various access specifiers for Java classes?  >> What is the difference between an Inner Class and a Sub-Class?    

Friday, 18 November 2016

What does the “static” keyword mean ? Can you override private or static method in Java ?

The static keyword denotes that a member variable or method can be accessed, without requiring an instantiation of the class.


  • User cannot override static methods in Javabecause method overriding is based upon dynamic binding at run time.
  • Static methods are statically binded at compile time
  • A static method is not associated with any instance of a class so the concept is not applicable.

No comments:

Post a Comment

Designed By Seo Blogger Templates