Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

why we use main in java?

Answer Posted / amit

look guys,we use main() method inside java cause whenever we
compile .java file then jvm call classname.main() first
without make any object.main method must be public and static
cause public for wide accessing and jvm call main() without
creating any object its only possible when main() is static
method.and all the argument taken by main in form of string
thats why we write as.......
public static void main(String args[])
it canbe
public final static void main(String args[])

Is This Answer Correct ?    24 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do I need to import javlang package any time? Why ?

1037


What is the difference between java class and bean?

1028


Why a component architecture for the java platform?

1114


Brief description about local interfaces?

1191


What is the diffrence between a local-tx-datasource and a xa-datasource? Can you use transactions in both?

982


Difference between new operator and class.forname().newinstance()?

1084


What is in-memory replication?

1012


What happens when a thread cannot acquire a lock on an object?

974


How database connectivity in XML is achieved?

2194


Explain the steps in details to load the server object dynamically?

5063


What modifiers may be used with an interface declaration?

1073


AS a developer will u create a data source in connection pool? If so how will u do that, how to access the object from connection pool using IRAD tool?

2090


Why are my checkboxes not being set from on to off?

1085


Can I run seam with jdk 1.4 and earlier?

939


what are the activation groupworks?

2129