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 / suresh.t.c

public static void main(String arg[])

public for accessing all object

static for to call main method without instance

void main for not returning values for avoid compilation errors

String arg[] is ,in input takes as strings so takes multiple inputs declared String with array of arg[]

Is This Answer Correct ?    14 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the access modifiers available in java?

1063


How can we find the sum of two linked lists using stack in java?

1052


What are the different types of data structures in java?

942


What access modifiers can be used for class ?

976


whatis Home interface and Remoteinterface? with example?

1948


What is void in java?

1018


How would you format a date in java? I.e. In the ddmmyyy format?

1319


Write a java program that prints all the values given at command-line.

971


What are different types of references?

934


What is classname class in java?

992


How destructors are defined in java?

1124


Explain the term virtual machine?

986


Explain with example the concept of constant variable in java.

1102


Does java vector allow null?

898


What is derived datatype?

1153