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 are thread local variables?
What is the difference between procedural and object-oriented programs?
Explain about interrupt() method of thread class ?
What about main() method in java ?
Is string a class?
Why singleton is not thread safe?
Can we cast any other type to boolean type with type casting?
How do you convert bytes to character in java?
Can a private method be declared as static?
What are the two categories of data types in the java programming language?
In how many ways we can create threads in java?
Is java call by value?
Is multiple inheritance supported by java?
Where is the singleton class used?
What are the 4 types of characters?