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 many threads can java run?

1059


What is size of int in java?

1006


What are the 6 functions?

916


What is canonical name in java?

1063


What is the use of coding?

921


Why string is a class?

902


What is the purpose of checked and unchecked exceptions in JAVA?

963


What is the difference between the paint() and repaint() methods?

1017


What is the r character?

980


What is array and arraylist in java?

1056


Can static method access instance variables ?

1077


Can an interface be final?

981


Give me example of derived data types.

1099


Mention some interfaces implemented by linked list in java.

984


What is lazy initialization in java?

949