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
extending thread class or implementing runnable interface. Which is better? : Java thread
How will you load a specific locale?
How are destructors defined in java?
What is Garbage Collection in Java
How many ways can we create the string object?
Can a list be null in java?
What are the ways in which a thread can enter the waiting state?
How much ram can a 64 bit processor theoretically?
What is "this" keyword in java? Explain
What is the meaning of variables in research?
What is main string [] args?
What is the difference between an if statement and a switch statement?
java program with complete 4 oops concepts implemented example
What are 3 boolean operators?
Explain the difference between runnable and callable interface in java?