Answer Posted / nikhil agrawal
Main method is static and static method is not override.
For example:- if i have Class A having main method and Class B extends Class A and also having the main method. in that case Class B hide the main method of A not override.
overriding process occur on run time and but static method load on compile time. that's its the reason we can not override main method but we can hide it.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How many ways can you break a singleton class in java?
What is difference between static and final?
Is linked list a linear or non-linear data structure?
explain multi-threading in java?
Explain reverse a linked list iterative solution in java?
What is jit compiler in java?
how we can make a read-only class in java?
How listener identify that the event came from a particular object?
What is hashset in java?
What is * argv?
Can you create an object of an abstract class?
What is the loop in java?
Hi.... I applied for the post of scientific officer/Engineer-SB(Programmer).Please post the syllabus and sample papers.
What is null mean in java?
Compare java and python.