What happens when a main method is declared as private?
Answer Posted / thiru
The default signature should not be altered. If any changes, at run time "Class xxx does not have main method" exception will be thrown. But compilation will not give any exception.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
How to read and write image from a file ?
Write a java program for binary search?
What is a Transient Object?
What is static method with example?
Explain the init method?
What is initial size of arraylist in java?
What about member inner classes?
What is java argument list?
Can private class be inherited in java?
How to find the given number is a prime number or not by getting input from the user
What are the drawbacks for singleton class?
Explain the difference between the public, private, final, protected, and default modifiers?
Is it possible to use string in the switch case?
Where is const variable stored?
How hashmap increases its size in java?