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
When should a function throw an exception?
When should you use arraylist and when should you use linkedlist?
What are advantages of using Java?s layout managers than windowing systems?
What is the final class modifier?
How to avoid memory leak in java?
what is the difference between thread and runnable types? : Java thread
What is the major difference between linkedlist and arraylist?
What is parsing a sentence?
Explain implementation and how is it different from conversion?
Is void a data type?
What is the difference between a window and a frame in java programming?
Can an object subclass another object?
What are the two ways to create a thread?
What is the difference between this() and super() in java?
What is natural ordering in java?