Can we use Private static void main()Instead of public static void main()?

Questions by gvvskumaran   answers by gvvskumaran

Showing Answers 1 - 3 of 3 Answers

raj

  • Jan 16th, 2007
 

NO , Suppose you are using variable  entire program then use public.suppose you are using within the loop then use private.

  Was this answer useful?  Yes

Guest

  • Jan 16th, 2007
 

Hi u can use private static void main becoz it does not give any error while compiling but while executing u will get an exception.

  Was this answer useful?  Yes

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