Search Interview Questions | More than 3000 questions in repository. There are more than 900 unanswered questions. Click here and help us by providing the answer. Have a video suggestion. Click Correct / Improve and please let us know. |
|
| ||||
Interview Questions and Answers | ||||
| ||||
Ans. Static methods can be called using instance references wherein this would have made sense but static method can also be called using Class name wherein this would mean nothing and hence forbidden. | ||||
Help us improve. Please let us know the company, where you were asked this question : | ||||
Like Discuss Correct / Improve  java   static methods   this keyword | ||||
Try 2 Question(s) Test | ||||
Related Questions | ||||
What are the advantages and disadvantages of static variables and static methods ? | ||||
Can we access instance variables within static methods ? | ||||
In which cases , moving methods to utility class could be useful ? | ||||
Can we override static methods ? Why ? | ||||
Interface can only have ... | ||||
How can we ensure thread safety in static method ? | ||||
Does java allow overriding static methods ? | ||||
When are static and instance methods resolved ? During compile time or Runtime ? | ||||
Have you ever tried mocking static methods ? | ||||