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 happens if we override private method?
If an object reference is set to null, will the garbage collector immediately free the memory held by that object?
Can you extend main method in java?
Why do we override tostring method in java?
What is object data type?
Is minecraft 1.15 out?
What is a method vs function?
Define how can we find the actual size of an object on the heap?
Can we declare the static variables and methods in an abstract class?
What is the static block?
How do you make a thread in java?
What is the difference between and ?
How do you clear an arraylist in java?
What is stream api in java8?
What is the use of protected in java?