What happens when a main method is declared as private?
Answer Posted / srinivasa
JVM is also a program. If main() is declared as privateit
is not available outside of that class . So JVM through the
exception.
Is This Answer Correct ? | 15 Yes | 5 No |
Post New Answer View All Answers
What are the basics of core java?
What is return used for in java?
What is the difference between compile-time polymorphism and runtime polymorphism?
What is the SimpleTimeZone class?
Highest level event class of the event-delegation model?
What is difference between next () and nextline () in java?
Differentiate between array list and vector in java.
What is hotjava?
What are the differences between processes and threads?
Explain the use of volatile field modifier?
Explain the difference between jvm and jre?
Realized?
What is java used for?
What is string manipulation?
How do you reverse sort in java?