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
Can we use this () and super () in a method?
When will you define a method as static in Java?
What is the difference between int and integer in java?
How do you create a null object?
How do you define a parameter?
What do you mean by checked exceptions?
What is scope & storage allocation of static, local and register variables? Explain with an example.
What are methods and how are they defined?
What is the SimpleTimeZone class?
What is multithreading and its advantages?
What is an empty class? What functionality does it offer in Java?
What is an example of procedure?
Is void a wrapper class?
What is a boolean output?
What are the restrictions imposed on method overriding?