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

what are memory considerations of jsp compares to other web components?

6539


What is the form of storage space in java?

2250


wahts is mean by dynavalidatorform in struts/

2080


What is the purpose of the wait(), notify(), and notifyall() methods?

1033


Do we need to override service() method

1731


what are RemoteObjects?

2749


Explain the different types of memory used by jvm?

1146


What restrictions are placed on the values of each case of a switch statement?

1026


What is the difference between session and entity beans?

1119


What is the purpose of the notify() method?

1077


Define aop(assepct oriented programing)?

1182


Where we can write Rmi registry in the code, without having to write it at the command prompt?

2771


Explain how will the struts know which action class to call when you submit a form?

963


what are the advantages of JTA over JTS?

2213


How are the elements of a borderlayout organized?

1118