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
What is mime in java?
Is java built on c?
What is the difference between swing and awt components?
What is java flatmap?
Why do we need new date and time api in java se 8?
What does el mean in java?
What is tight coupling in java?
ioc vs dependency injection?
What is stateless and stateful in java?
Why bean class is used in java?
What is web xml java?
What is the difference between lambda expression and anonymous methods?
How do I enable java in firefox?
How do you type the lambda symbol?
Define network programming?