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

Give a brief description of java socket programming?

904


What are autoboxing and unboxing? When does it occur?

890


What is the exception hierarchy in java?

909


What is finalize() function in java?

955


What is the use of jtable?

1059


What is a ?

1152


What is thread life cycle in java?

1006


When will you define a method as static in Java?

993


How a string is stored in memory?

955


Is string a class?

968


What do you mean Abstraction in java?

1037


What is the exact difference in between unicast and multicast object? Where we will use?

938


Does java support function overloading, pointers, structures, unions or linked lists?

1037


What are use cases?

905


What is jit compiler in java?

1027