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 / pandurang d billavar

for execution of class in java is done by creating a object
for methods of that class.so main method is also a class
method.so this method is called by jvm directly without
creating object for main method.it is possible only if main
is static.............so we maked main as static.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Say any two properties in beans?

1057


How many ways can we create the string object?

1013


how we can make a write-only class in java?

1020


If a class is declared without any access modifiers, where can the class be accessed?

1062


Why array is used in java?

961


How can you read an integer value from the keyword when the application is runtime in java? example?

1122


What is "this" keyword in java? Explain

1095


What are the different access modifiers available in java?

1031


What is the purpose of main function in java?

1019


When is finally block not called?

1082


How do you calculate roots in java?

1079


What is the use of 'super' keyword inside a constructor?

962


Is math class static in java?

1107


Difference between overriding and overloading in java?

1062


What is the purpose of garbage collection in java? When is it used?

1043