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
Does java return by reference?
Can you write a java class that could be used both as an applet as well as an application?
What is class level lock ?
can any body body expalin best definitions & best real time exaples for opps concepts.
Can we define a package statement after the import statement in java?
What about abstract classes in java?
Can a constructor be protected?
What is a char in java?
What does jre stand for?
What is mean by encoding?
What are the important features of Java 9 release?
Is there a case when finally will not execute?
What is a java list?
What is increment in java?
What is difference between fail-fast and fail-safe?