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 / sai kiran varma

In java main() is a default calling funtion.
first main() function is called.
As we dont no what value it returns we use void keyword for it.
only static methods can be called using class names so we
declare static.
only public methods can be accessed from any where so,we use
public..

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

why are there separate wait and sleep methods? : Java thread

1016


Can we force the garbage collection to run?

938


What is the difference between the prefix and postfix forms of the ++ operator?

1012


What is difference between null and void?

964


What is parsing a string?

1153


What is JVM and is it platform independent?

1042


Why java is said to be pass-by-value ?

1032


How does linkedlist work in java?

912


Why java is platform independent? Explain.

997


List the three steps for creating an object for a class?

960


What is unicode used for?

1147


Is java util list serializable?

921


What causes memory leak in java?

926


What does sizeof return?

978


What is an interface in java?

1045