What happens when a main method is declared as private?
Answer Posted / yogesh gandhi
Wrong Vani.
The output of the program is
C:\>javac abc.java
C:\>java abc
Main method not public.
Is This Answer Correct ? | 72 Yes | 5 No |
Post New Answer View All Answers
What is the difference between static method and instance method in Java?
How do you compare characters in java?
How do I know if java is installed?
What is a final class in java?
Explain about instanceof operator in java?
Why destructor is not used in java?
Can a main method be overloaded?
Do we need to manually write Copy Constructor?
What is the symbol for space?
What is logical variable?
What is bool mean?
What are the different approaches to implement a function to generate a random number?
Is 0 an irrational number?
What is mnemonic in assembly language?
What are the concepts of 'OOPS'?