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

What is extension method in java?

1040


What is entry set in java?

1136


What is byte data type?

999


Is the milky way in a void?

966


How to find the largest value from the given array.

1012


Difference between java and javascript

1092


What is a parameter in matrices?

1051


Is it correct to say that due to garbage collection feature in java, a java program never goes out of memory?

1019


Can inner class have constructor?

1042


What is better- service oriented or batch oriented solutions?

2218


What are examples of modifiers?

1125


How many classes can any class inherit java?

970


What does || mean in vectors?

931


Can you explain the meaning of aggregation and composition

1010


Is java call by value?

1091