Can Main method be overloaded ?
Yes, you can overload main method in Java. But the program doesn't execute the overloaded main method when you run your program; you have to call the overloaded main method from the actual main method.
This means we can overload static methods in Java.
Then question comes,
Can we override static methods in java---No
The following are 3 cases where we failed in overriding the method
· When superclass method is STATIC.
· When superclass method is PRIVATE.
· When superclass method is FINAL.
Thursday, 18 June 2015
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment