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 / kanchan bangar

In java if we are not writting public static void main
(String args[]) then program is only compield not run
that's why it must write because compiler in java always
look the main function and when compiler always calls the
main class is loaded in frist time call for that static
keyword is used and public is for access everything means
methods and member variabls of any pakage and classes or in
super class and meand it does not return any value.

Is This Answer Correct ?    18 Yes 57 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the common usage of serialization?

1218


What method is used to specify a container's layout in java programming?

1205


Can a class have multiple subclasses?

1151


What are some examples of variable costs?

1005


What is a control variable example?

1078


What does .equals do in java?

1169


What is a variable in java?

1215


Why is the singleton pattern considered to be an anti pattern?

944


What is == and === in javascript?

1104


How many java versions are there?

1117


What is the purpose of default constructor?

1035


What do you understand by weak reference?

1064


Why convert an applet to an application?

1160


What are the methods used to implement for the key object in the hash map?

1087


how would you implement a thread pool? : Java thread

968