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?



Why is the main method static in Java?..

Answer / 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

More Core Java Interview Questions

How will you convert an ArrayList to Arrays?

4 Answers   KPIT,


What is the root class for all Java classes?

8 Answers   IBM, Infosys,


What does business logic mean?

0 Answers  


How the interruptible method gets implemented?

0 Answers  


How will you load a specific locale?

0 Answers  


Why is serialization required?

0 Answers  


Explain Method Overloading in Java.

1 Answers  


Name two subclasses of the TextComponent class?

2 Answers  


What steps are taken when the OS shifts from one-thread execution to another?

0 Answers   Amazon,


Explain an algorithm to find depth of a binary tree.

0 Answers   Akamai Technologies,


what is java

10 Answers  


Why string is not a wrapper class?

0 Answers  


Categories