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 java main method is given as static method?

Answers were Sorted based on User's Feedback



why java main method is given as static method?..

Answer / saravanan.v

Java is a object oriented language.So even main method also should be written inside a class name main class.So main method should be called WITHOUT CREATING OBJECT for main class.For this purpose, it is declared as static.

Is This Answer Correct ?    6 Yes 0 No

why java main method is given as static method?..

Answer / chaithanya

main method is called by JVM.without creating the object we are calling main.that's what it is declared Static.
static nothing but without creating the object,we can call that method

Is This Answer Correct ?    2 Yes 0 No

Post New Answer

More Core Java Interview Questions

What are the advantages of the model over the event- inheritance model?

1 Answers  


What are features of java?

0 Answers  


What is parsing a string?

0 Answers  


Interface A { String test(); } Interface B { int test(); } Create a class AB which must implements both A & B interfaces.

17 Answers   Hewitt,


Can we define private and protected modifiers for the members in interfaces?

0 Answers  


10. class Nav{ 11. public enum Direction { NORTH, SOUTH, EAST, WEST } 12. } 13. public class Sprite{ 14. // insert code here 15. } Which code, inserted at line 14, allows the Sprite class to compile? a)Direction d = NORTH; b)Nav.Direction d = NORTH; c)Direction d = Direction.NORTH; d)Nav.Direction d = Nav.Direction.NORTH;

2 Answers  


Is string serializable in java?

0 Answers  


what is deadlock in threads? with example

2 Answers   CTS, XOXO,


what are literals in java?

2 Answers  


What is slash r?

0 Answers  


What is java thread dump, how can we get java thread dump of a program?

0 Answers  


Explain the inheritance?

0 Answers  


Categories