In Java why we write public static void main(String args[])
why not main()?
Answer Posted / sivadasan
1. public - Access Specifier, properties and methods can
access anywhere, any package.
2. main() - The Java environment starts the execution of a
program from main() method.
3. void - The main() method is not return anything. So the
return type of the main() method must be void.
4. static - The jave environment able to call the main()
method without creating an instance of the class. So its
declared as static
5...(String args[]) -- In java, whatever we give, it will
takes as String. So we are giving the command line argumet
as String.
i hope it will help u..
Shivadasan
Coromandel Infotech
| Is This Answer Correct ? | 16 Yes | 4 No |
Post New Answer View All Answers
What is http client in java?
What is ‘is-a ‘ relationship in java?
What does a za z0 9 mean?
Difference between error and exception
Why is boolean important?
What is the purpose of a transient variable?
How to create a fecelet view?
What means public static?
What is use of inner class in java?
What is hashing in java?
What is java in detail?
Give few difference between constructor and method?
Explain the use of javap tool.
What is multi level inheritance in java?
Which is illegal identifier in java?