What happens when a main method is declared as private?

Answers were Sorted based on User's Feedback



What happens when a main method is declared as private?..

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

What happens when a main method is declared as private?..

Answer / vani

Nothing Happen.
Code compiles properly and executes properly.

Is This Answer Correct ?    5 Yes 76 No

Post New Answer

More Core Java Interview Questions

How can the checkbox class be used to create a radio button?

0 Answers  


What are the OOAD concepts in java explain with examples?

4 Answers   Aricent, CTS,


What is predicate in java?

0 Answers  


Which java version is latest?

0 Answers  


What are the three parts of a lambda expression? What is the type of lambda expression?

0 Answers  






Can constructor return value?

0 Answers  


what is the difference between abstract class and Interface?where we can use it in realtime projects?

23 Answers   Agile Software, Cognizant, IBM, Innodata, Logica CMG, Mitosis, Nagarro, Value Chain,


How do you achieve polymorphism in java?

0 Answers  


What is an eror in java?

0 Answers  


What is the use of protected in java?

0 Answers  


What is a layout manager?

1 Answers  


Why java does not supports multiple inheritance?

3 Answers   TCS, VSoft,


Categories