This post originated from an RSS feed registered with Java Buzz
by Arpit Mandliya.
Original Post: Can we override static method in java
Feed Title: Java tutorial for beginners
Feed URL: http://feeds.feedburner.com/arpitmandliyasblog
Feed Description: A blog about java programming language and its frameworks
No, we can not override static method in java. Static methods are those which can be called without creating object of class,they are class level methods. On other hand,If subclass is having same method signature as base class then it is known as method overriding. Its execution decided at run time. Below are the reasons why we can’t override static method in java:- Static methods are those which belong to the class.They do not belong to the object and in overriding, object decides which method is to be called. Method overriding occurs dynamically(run time) that means which method is to be