What happens when a main method is declared as private?
Answers were Sorted based on User's Feedback
Answer / varsha vilas kalebag
IF MAIN METHOD IS DECLARED AS PRIVATE ,THEN WE CAN NOT
ACESSES THE PRVIATE MEMBERS IN ANOTHER CLASS
| Is This Answer Correct ? | 5 Yes | 43 No |
Answer / vani
Nothing Happen.
Code compiles properly and executes properly.
| Is This Answer Correct ? | 5 Yes | 76 No |
What is isa relationship?
In java, how many ways you can take input from the console?
What are the restrictions imposed on method overriding?
Can you declare the main method as final?
Why is java not 100% pure oops?
How does a try statement determine which catch clause should be used to handle an exception?
What is output buffer?
What is stack class in java?
How can I debug the Java security exceptions and AccessControlExceptions?
Why should we use java?
What is the use of runnable interface?
What are the various access specifiers in java?