In Java why we write public static void main(String args[])
why not main()?
Answer Posted / praveen
PUBLIC: in this we should access the function inside d class
or outside d class
STATIC:if any method is invoking obj is must.but using
static no obj is necessary.
VOID: void means nothig.in main method we should not declare
any value. so void is return type.
STRING[]ARGS:in java every input consider as a string
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
What are alternatives to java serialization?
explain what is transient variable in java?
What is a parameter in a function?
What is the benefit of using enum to declare a constant?
Can a static class implement an interface?
Explain notify() method of object class ?
How to avoid memory leak in java?
what is the major difference between linkedlist and arraylist in java?
How do you check if a number is a perfect square?
What is rule of accessibility in java?
What is bytecode in java ?
What is the difference between inheritance and encapsulation?
What is boolean false?
What is meant by distributed application? Why are we using that in our application?
Explain where variables are created in memory?