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 is an iterator interface in java programming?
What happens if an exception is not handled in a program?
What is hashing in java?
How do you add an arraylist to an array in java?
What is the method overriding?
When throw keyword is used?
Does java support multiple inheritances?
Explain java coding standards for classes or java coding conventions for classes?
What is a control variable example?
What about main thread in java?
What is the latest version of java?
What is string intern in java?
What is supplier in java?
What is difference between filereader and bufferedreader?
Can an unreferenced object be referenced again?