What is the need to declare main() method as static in Java?
Answer Posted / monalisa
public static void main(String[] args) means
public - is the access modifier .if we declare a method as
public means we can access the method out side of the class.
static - It is a key word.If we declare a method as static
then we can call this method with out creating any instance
of that class.Directly we can call it by "CLASSNAME.STATIC
METHOD NAME"
void - It is the return type of the method
main - It is the Method name
Is This Answer Correct ? | 10 Yes | 0 No |
Post New Answer View All Answers
Are there tuples in java?
What is connection pooling in java?
Can I have multiple main methods in the same class?
What are the rules regarding quotation marks?
What is the use of flatmap in java 8?
Do I need to install jre if I have jdk?
What services can invoke lambda?
Who created eclipse?
What is jpa used for?
What is meant by rest api in java?
What is a yaml file in java?
What is meant by annotations in java?
Describe the principles of oops.
Define network programming?
Which instutute is offering course for rhino jain slee