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
Which is bigger float or double?
Can we define private and protected modifiers for variables in interfaces?
What is the difference between conversation & casting?
What is the difference between iterator and enumeration ?
Explain differences between collection api and stream api?
Is array passed by reference in java?
How do you use compareto in java?
What is meant by data hiding in java?
Why do we create public static method in java?
What is the replace tool?
Explain methods specific to list interface?
What is the meaning of I ++ in java?
Explain java coding standards for interfaces?
What is the difference between equals() and?
What is string english?