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
Why do we use bufferedreader?
Explain illegalmonitorstateexception and when it will be thrown?
How many arguments can be passed to main ()?
Name container classes in java programming?
What is main difference between variable and constant?
what is the significance of listiterator in java?
What is callablestatement? How you can call stored procedure to pass in parameter?
What is thread pool in java with example?
What is the use of math abs in java?
What is methods and methodology?
What are serialization and deserialization?
What is static in java?
Is string serializable in java?
Why Java doesn’t support multiple inheritance?
Explain aggregation in java?