In Java why we write public static void main(String args[])
why not main()?
Answer Posted / sai kiran varma
In java main() is a default calling funtion.
first main() function is called.
As we dont no what value it returns we use void keyword for it.
only static methods can be called using class names so we
declare static.
only public methods can be accessed from any where so,we use
public..
| Is This Answer Correct ? | 0 Yes | 3 No |
Post New Answer View All Answers
Difference between operator overloading and function overloading
What is class variable java?
Is age a discrete variable?
what is meant by Garbage collection?
what are Hostile Applets?
What is %02d?
What is lexicographically smallest string?
What is proper subset?
How does sublist works in java?
What is a protected method?
Are arrays classes in java?
Explain about the select method with an example?
Why does java doesnt suuport unsigned values?
What is try-with-resources in java?
What is map in java?