This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes main() method signature Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "main() method signature" Watch "main() method signature" New topic
Author

main() method signature

Rahul Gupta
Ranch Hand

Joined: Nov 20, 2002
Posts: 37
Hi,
I had seen in many sites and certification books that the access specifier public in the main methods signature
public final static void main(String args[])
{ /*...*/}
is mandatory.
However I find that even with other access specifier with main (other than public like protected, private etc.) the code compiles and runs fine.
Please specify what exactly is mandatory and what is not. I am confused.
Thanks,
Rahul


regards,<p>rahul <p>SCJP 1.4<br />--------<br />Life is great, make it meaningful<br />---------------------------------
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
You asked this question twice, less than an hour apart. It has been answered already here


Dave
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: main() method signature
 
Similar Threads
Please HELP...HELP
finalize() signature
access specifier
public static void main(String args[])
Default Constructor