What happens when a main method is declared as private?

Answer Posted / yogesh gandhi

Wrong Vani.

The output of the program is

C:\>javac abc.java

C:\>java abc
Main method not public.

Is This Answer Correct ?    72 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between iterator access and index access?

650


Why do we use string?

581


What is the maximum length of a url?

515


Is empty string in java?

544


What is meant by class?

547






What is numel matlab?

661


Which of the following classes will have more memory allocated?

587


What are different types of encoding?

589


Why string objects are immutable in java?

569


Can we declare register variable as global?

517


What is generic type?

574


In how many ways we can do exception handling in java?

580


Which programming language is best in future?

527


Write a program in java to establish a connection between client and server?

511


Explain the difference between throw and throws in java?

552