What happens when a main method is declared as private?
Answer Posted / amit kumar chaubey
If the main function is made private...it will compile
Sucessfully...and at the time of execution...it will
execute successfully...but desired result will not be
obtained. After execution..folowin message will be printed:
Main method not public.
| Is This Answer Correct ? | 25 Yes | 3 No |
Post New Answer View All Answers
What is a type parameter in java?
Detail discussions on JVM, memory management and garbage collector.
Which collections are thread safe in java?
Explain differences between checked and unchecked exceptions in java?
Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls
What does opcode mean?
What is the function of static in java?
What is flush () in java?
Explain implementation and how is it different from conversion?
What's the purpose of static methods and static variables?
How do you reverse sort in java?
Can we convert stringbuilder to string in java?
What are the advantages of compiled language?
What's the difference between comparison done by equals method and == operator?
How would you format a date in java? I.e. In the ddmmyyy format?