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...

In Java why we write public static void main(String args[])
why not main()?

Answer Posted / pandurang d billavar

for execution of class in java is done by creating a object
for methods of that class.so main method is also a class
method.so this method is called by jvm directly without
creating object for main method.it is possible only if main
is static.............so we maked main as static.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is called module?

931


What is a class reference?

1036


Why string is a class?

902


What is bifunction in java?

1126


What are different types of references?

940


What is passing value java?

1006


What is the common usage of serialization?

1078


What are the differences between stringbuffer and stringbuilder?

1008


Is empty .java file name a valid source file name?

1075


Is java se free?

895


Explain the public class modifier?

904


How to sort an array from smallest to largest java?

951


do I need to use synchronized on setvalue(int)? : Java thread

964


What is the purpose of skeleton and stub?

1157


How does list work in java?

871