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 does varargs work in java?

0 Answers  


What does exp mean in math?

0 Answers  


Why wait(),notify(),notifyAll() methods defined in Object class althought we are using in only threads.

0 Answers   Mphasis,


How can you traverse a linked list in java?

0 Answers  


What are advantages and disadvantages of OOPs?

0 Answers   Amdocs,


What are structs in java?

0 Answers  


What are desktop procedures?

0 Answers  


Can we sort hashset in java?

0 Answers  


What is the importance of hashcode() and equals() methods?

0 Answers  


How many digits is int32?

0 Answers  


When finalize method is called?

3 Answers  


Can a main method be overloaded?

0 Answers  


Categories