File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes regarding the static Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "regarding the static" Watch "regarding the static" New topic
Author

regarding the static

narayana satish
Greenhorn

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.

Bosun


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: regarding the static