why java main method is given as static method?
Answers were Sorted based on User's Feedback
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 |
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 |
What is the default value of byte datatype in java?
What is implicit object in java?
what are the design patterns in struts?
Explain about abstract classes in java?
What is ‘is-a ‘ relationship in java?
List types of storage classes in java?
Write a program in java to find the maximum and minimum value node from a circular linked list.
why java main method is given as static method?
what is difference between colection and collections?
25 Answers Amdocs, IBM, Infosys, Ipog Software, Polaris, Tech Mahindra,
What is a instance variable in java?
What releases of Java technology are currently available? What do they contain?
What is are packages?