File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes regarding the static Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Groovy Fundamentals video training course this week in the Groovy forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "regarding the static" Watch "regarding the static" New topic

regarding the static

narayana satish

Joined: Dec 21, 2000
Posts: 25
I am a new person to Java. Why we are using static in the main function.Is it necessary,if so why.If not why...
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
Defining a function as static means the function can execute without an instance of the class being created. This is why main is declared as static. It is where execution of a program begins, and it should execute even if no instances of the class are created.


So much trouble in the world -- Bob Marley
I agree. Here's the link:
subject: regarding the static