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 latest features introduced with java 8?

1007


Is java same as core java?

1035


How do you start a new line in java?

917


What is the function of static in java?

1007


What are the advantages of autoboxing?

974


What are the basic interfaces of java collections framework?

1042


What is lazy programming?

954


Does java map allow duplicates?

838


Define how does a try statement determine which catch clause should be used to handle an exception?

1062


Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.

970


What is quick sort in java?

939


What are the two parts of a conditional statement?

909


how can you catch multiple exceptions in java?

967


What is linkedlist in java?

929


What is io stream in java?

969