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 isan abstract class and when do you use it?

1665


Explain try and catch keywords in java?

1276


What is multiple inheritance? Is it supported by java?

1014


What is loop in java?

1049


How do you remove spaces in java?

1081


Why does my function print none?

1006


Which keyword specify that a variable is effectively final ?

1046


Can we sort arraylist in java?

1040


How we can declare a static variable?

1150


What is a predicate method?

1062


Can this keyword be used to refer static members?

1074


Can we make the abstract methods static in java?

1099


What are the basic control structures?

1034


How do you execute a thread in java?

990


Explain heap sort?

1170