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
What kind of variables a class can consist of?
State the significance of public, private, protected class?
How are multiple inheritances done in Java?
Write a method that will remove given character from the string?
List two java ide’s?
Can we write a class without main method in java?
When do I need to use reflection feature in java?
Is string an object?
What is the best definition for data?
Difference between final and effectively final ?
What are nested classes in java?
What are inner classes or non static nested classes in java?
Explain implementation and how is it different from conversion?
What is the difference between serializable and externalizable interfaces?
Difference between a process and a program?