How to override main method in java - Java @ Desk

Sunday, May 19, 2013

How to override main method in java

main method in java cannot be overridden since its a static method and static methods can never be overridden in java.

It can be done only if the subclass also uses the static keyword for the method.






No comments:

Post a Comment