What happens when a main method is declared as private?
Answer Posted / dharma
main method signature must be like
public static void main(String args[])
if we declare as private then it compiles successfully
but at Runtime it says
"Main method not found in class"
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain about field hiding in java?
What are the changes in java.io in java 8 ?
What is api in java?
What is map in java?
How do you check if an arraylist is not empty?
What is the use of list in java?
what is mena by object block any what is the use of that
What is finalize()?
Difference between nested and inner classes ?
What is http client in java?
Differentiate storage classes on the basis of their scope?
What is a Hash Table? What are the advantages of using a hash table?
What are the default and parameterized constructors?
Define class?
Does java list allow null?