In java:-
If main method declared as private then program compile but at rum time
it will give "Main Method not Public" message
If the static modifier is removed from the signature of the main method
then program compile but run time error is " No Such Method Error".
If I write static public void main instead of public static void main
then program compile and run properly.
|
My Blog Title
|