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 / ravi

static because once the class is loaded the main() will be
invoked first.
void because main()is not returning any value.

Is This Answer Correct ?    228 Yes 99 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Differece between class and generic class?

1090


why doesn't java run on all platforms?

1069


What do you mean by boolean?

1110


How can we access some class in another class in java?

1051


How does thread synchronization occurs inside a monitor?

1181


Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1685


What exactly is a .class file?

1095


How does arraylist size increase in java?

1166


How the metacharacters are different from the ordinary characters?

1063


What is bubble sort in java?

1100


Is array synchronized in java?

1078


How many return statement are allowed in a function?

979


What is method reference in java?

1190


What is the size of int?

1124


What's the default access specifier for variables and methods of a class?

1164