What happens when a main method is declared as private?

Answer Posted / sagar chavan

If the main function is made private,

we can do it but the starting point of project should be changed. By default it is main.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of inner classes (non-static nested class) used in java?

551


What is a parameter in java?

537


How do you define a method?

505


what is recursion in java

589


Which methods are used during serialization and deserialization process?

542






Why java doesn’t support multiple inheritances?

570


Is constructor inherited?

524


Can I declare a class as private?

575


What is the main use of generics in java?

500


Give example to differentiate between call by value and call by reference.

582


Can we inherit inner class?

513


What about static nested classes in java?

578


Why to use nested classes in java?

577


How do you create an array in java?

521


what is the difference between future and callable interface in java?

594