If we declare main method as private instead of public, Will it execute or not.

Questions by rajesh.tripathi

Showing Answers 1 - 13 of 13 Answers

Vipul

  • Jul 18th, 2007
 

It gives java.lang.class not found errror.

  Was this answer useful?  Yes

kARUNA

  • Jul 23rd, 2007
 

If you declare main() as private insted of public, we can compile the program but we cannot get the output.

  Was this answer useful?  Yes

kiran

  • Aug 16th, 2007
 

There is no exception

In Java the compiler compiles the programe but whenever we execute that we wont get any output because of?access specifier PRIVATE. The main method?does not?not call the member function (methods)

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions