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 is a parameter example?

514


What is the benefit of inner / nested classes ?

517


Why pointers are not used in java?

565


What is busy spin, and why should you use it?

575


What are packages in java?

549






Define an abstract class with reference to java.

562


When should I use a singleton?

541


Is java a compiler?

555


What is string subsequence method?

611


What is treeset in java collection?

509


What is the use of pattern in java?

496


Explain about java sdk?

570


How do you create a sop?

516


Which are the two subclasses under exception class?

510


Explain the difference between throw and throws in java?

536