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

how are methods defined?

1046


Implement 2 stacks with just 1 array. The stack routines must not indicate overflow unless every slot in array is used.

1303


Can I extend singleton class in java?

1093


How do you write methodology?

982


Explain the difference between string, stringbuffer and stringbuilder in java?

996


Where are global variables stored?

945


What are voids?

960


What is the size of integer?

1092


What is the base class of all classes?

1055


What is java life cycle?

999


Given a singly linked list, how will you print out its contents in the reverse order? Can you do it with consuming any extra space?

982


Is boolean a wrapper class in java?

1045


Explain Basics of OOP Language in java

1049


What will be the initial value of an object reference which is defined as an instance variable?

1131


What is internal variable?

1003