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

Difference between operator overloading and function overloading

1012


What is class variable java?

958


Is age a discrete variable?

917


what is meant by Garbage collection?

1037


what are Hostile Applets?

2017


What is %02d?

1037


What is lexicographically smallest string?

1016


What is proper subset?

917


How does sublist works in java?

900


What is a protected method?

1076


Are arrays classes in java?

966


Explain about the select method with an example?

1110


Why does java doesnt suuport unsigned values?

2174


What is try-with-resources in java?

1101


What is map in java?

944