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 are the main differences between the java platform and other platforms?
how can you catch multiple exceptions in java?
Why there are some null interface in java? What does it mean?
Is string serializable in java?
what is difference between length and length()?
Why do we need data structure in java?
what is difference between interface and abstract class..?
Can private class be extended java?
How many objects are created for a singleton class
How do you control extraneous variables?
What is the output of the below java program?
Can list be final in java?