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

static methods can be accessed without creating object object of class, we know that file name of java program is "classname.java", "classname" is the class which contain main function, so it is easier for compiler to locate class which contain main(), and because of static nature it can execute it.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can a gui component handle its own events in java programming?

1033


What is runtime locatable code?

1417


Write a program to print all permutations of string?

1101


What are the advantages and disadvantages of object cloning?

1101


What is numeric function?

991


Where is jre installed?

1023


How many arguments can a method have java?

1014


What is the super void?

895


Can we declare an interface as final?

1050


What Is Composition?

1041


What is difference between equal and == in java?

947


What is the static import?

1094


What do you understand by the term string pool?

996


Can a static class implement an interface?

1106


Is singleton set an interval?

953