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

as compiler needs to enter inside a program to compile so
public is used and static is used to help the main method
to be invoked without an object.

Is This Answer Correct ?    3 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a substring of a string?

1163


Why do we need hashset in java?

1043


Explain list interface?

962


Define linked list and its features with signature?

1002


Can a class extend 2 classes in java?

1037


What is a treemap in java?

1012


What is java volatile?

1053


What is the concept of multithreading?

991


What is the default size of load factor in hashing based collection?

1051


Mention the default values of all the elements of an array defined as an instance variable.

985


Can we declare an interface as final?

1067


What is abstract class? Explain

1045


What are the difference between composition and inheritance in java?

1027


Does java arraylist maintain insertion order?

999


What is hashing principle in java?

1026