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

Explain the Propertie sof class?

1107


What is meant by vector class, dictionary class, hash table class, and property class?

1234


What is join () in java?

1012


What is indexof?

1030


2) Suppose there are 5 directories having lot of files (say txt files) in each directory. 2 things :- 2.1) You want to search for filenames which have a particular pattern. 2.2) Out of these filtered files you want to search for a particular keyword or a search string. How can you achieve this?

2327


what is the purpose of "virtual"?

1126


Is string passed by reference in java?

1045


What are the two parts of a conditional statement?

995


What is the function of http?

1066


What are the parts of methodology?

1032


What is java literals?

1202


How do I compare two strings in word in java?

1039


Does java linked list allow duplicates?

1020


What is the this keyword?

1089


Can singleton class be inherited in java?

1058