why java main method is given as static method?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What are internal variables?

771


What is basic syntax?

746


What are the properties of thread?

684


How do you create immutable object in java?

779


Enlist diffrent types of inheritance supported by java?

690


Can a class be private in java?

742


Write a program in java to create a doubly linked list containing n nodes.

743


What do you mean by ternary operator in java?

785


What is private public protected in java?

804


What is set and get methods in java?

738


What is compareto?

741


Mention some features of java?

735


What does string [] args mean?

743


What is a pointer and does java support pointers?

780


Is map sorted in java?

814