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 / deependra prarap singh

in the java when we creat any of the class then the "java's compiler after entering in the class ,
fistly search for the static because the java's compiler know every thing about the static
and then java's compiler search for the main method,
as we know that the main is a method then there should be some return type so we use void because it has no return type
after declaring the void now we use the public because we are to access the main method from any where or outside
"

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which containers use a flowlayout as their default layout in java programming?

1014


What are green threads in java?

1001


What are the advantages of defining packages in java?

986


What is predicate in java?

1059


How do you find the absolute value?

1060


How do you sort words in java?

928


Explain about public and private access specifiers?

1056


Can java cast null?

1039


What are the two ways of implementing multi-threading in java?

1508


what is the purpose of the wait(), notify(), and notifyall() methods? : Java thread

992


What does a method signature consist of?

984


Why is java called java?

1050


What are packages in java?

1650


What ide should I use for java?

1030


What are Normalization Rules? Define Normalization?

1054