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

public static void main(String args[]) the meaning is

public:- Actually the main()method will be called by JVM .so
JVM is located other place so JVM will called by our main()
its public

static: with our object creation run our main()method so
thats its static

void:our main() method can't any return type thats its void

String args[]:. To get command_line arguments

Is This Answer Correct ?    7 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the benefit of abstract class?

891


How to instantiate member inner class?

1025


How many decimal digits is 64 bit?

868


What are facelets templates?

978


Can I override protected method in java?

1017


What is the name of the java compiler?

1003


Which is best ide for java?

994


Name few java util classes introduced with java 8 ?

870


What is java and its types?

1015


What does the string method compareto () do?

1007


Can sleep() method causes another thread to sleep?

984


Why can't we use static class instead of singleton?

884


What is final modifier?

983


Is list ordered in java?

918


Explain about map interface in java?

943