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

yes in every progrm in jave the main is static.because when
the program will start ,thit means runnig then the main is
also one method it was called first that means without
instans creations the main is called.thet is the reason we
are put as main is static method(static is used for without
instance creat u call it).void means it does not reaturn
any value

Is This Answer Correct ?    148 Yes 43 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is java reflection?

992


What if the main() method is declared as private? What happens when the static modifier is removed from the signature of the main() method?

1201


What is a method in programming?

1196


Can we cast any other type to boolean type with type casting?

967


What is the default size of arraylist in java?

1137


What is composition in java?

1301


What are the disadvantages of object oriented programming?

1287


What is the latest version of java?

1145


What package is math in java?

1016


Why are functions called methods in java?

1014


Hi friends am new to java. I read jar file means collection of java files. For executing struts application what are the necessary jar files. " struts.jar " file contains what. can u explain

1944


When the constructor of a class is invoked?

1044


What are three ways in which a thread can enter the waiting state in java programming?

1178


Where are local variables stored?

977


Why unicode is important?

947