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 / sudheer nath

public means the main functiio can be accessible outside the class the jvm remain outside the class so we add the public visiblity mode.
static means the compiler automatically called the main ()functio without creating its instance or object.
void is the return type of the main function means main() does not return any kind of values to its caller means jvm.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is flag in python?

1028


Define packages in java?

997


Explain constructors and types of constructors in java.

1097


Can we create an object of private class?

964


Why is singleton class used?

1030


What does += mean in java?

1068


What is jvm? How its run?

1075


What do you mean by a JVM?

1240


What is io stream in java?

1042


What is the internal implementation of set in java?

917


What are the java ide's? Explain

1032


Explain different forms of polymorphism?

1141


How hashset works internally in java?

1081


What is static data type in java?

1024


How many bits is size_t?

983