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 JVM and is it platform independent?

1057


Explain covariant method overriding in java.

1116


Does java isempty check for null?

1008


Differentiate between nested and inner class in java.

1013


How do I convert a string to an int in java?

1079


What is difference between class and object in java?

1083


What is scope & storage allocation of static, local and register variables? Explain with an example.

1020


Can we restart a dead thread in java?

1001


What is %02d?

1091


Why doesn't the java library use a randomized version of quicksort?

999


What is natural ordering in java?

971


What is java oops?

1098


What are the Class Libraries ?

1055


How can you share data between two thread in Java?

953


What are checked exceptions?

1040