What happens when a main method is declared as private?
Answer Posted / harsha
When a method is declared as private, the program compiles
properly but it will give runtime error ?Main method not
public"
| Is This Answer Correct ? | 111 Yes | 8 No |
Post New Answer View All Answers
How many ways can an argument be passed to a subroutine and explain them?
How to declare objects of a class ?
What is final keyword?
What are the practical benefits, if any, of importing a specific class rather than an entire package (e.g. Import java.net.* Versus import java.net.socket)?
How do you stop a thread in java?
What do you mean by of string::valueof expression in java 8?
Can final class have constructor?
What is difference between array and vector?
What is anti pattern in java?
What does it mean to flush a file?
What is linked hashmap and its features?
What is the advantage of preparedstatement over statement?
Is cout buffered?
What is the difference between abstract classes and interfaces?
What is class and its types?