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 nan in java?
What is heterogeneous in java?
What is difference between hashset and hashmap in java?
What’s the difference between constructors and other methods?
Which oo concept is achieved by using overloading and overriding?
What is Java Package and which package is imported by default?
Explain thread life cycle in java?
How to make a non daemon thread as daemon?
What are voids?
How do you define a method?
What are the important features of Java 9 release?
what is meant by encapsulation?
What is keyset in java?
What is 32 bit float?
What are some alternatives to inheritance?