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...

Why is the main method static in Java?

Answer Posted / nashiinformaticssolutions

Java's main() function is static by default, allowing the compiler to call it either before or after creating a class object. The main () function is where the compiler begins programme execution in every Java programme. Thus, the main () method needs to be called by the compiler. If the main () method is permitted to be non-static, the JVM must instantiate its class when calling the function.

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 the latest java version?

1112


What does t in java mean?

1056


Does java have extension methods?

1043


How can the checkbox class be used to create a radio button?

1079


In a container there are 5 components. I want to display all the component names, how will you do that?

2245


What does singleton class mean?

1028


What is the difference between integer parseint and integer valueof?

1045


Is vector thread safe in java?

1094


I don’t want my class to be inherited by any other class. What should I do?

1059


what are abstract functions?

1081


What is the use of private static?

1092


What is skeleton and stub?

1159


What is the function of java?

1052


What are the data types supported by java? What is autoboxing and unboxing?

1065


What are meta-annotations?

1040