In Java why we write public static void main(String args[])
why not main()?
Answer Posted / ratna
As said by Prabhakant Prabhakar Rasal
if There are two main reasons to write string args[]
1. TO identify the program
2. To get command_line arguments
How does the string args[] helps in identifying the program ????
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Which class is the superclass of all classes?
Does list maintain insertion order java?
Can we define private and protected modifiers for the members in interfaces?
Can you instantiate the math class in Java?
What is the purpose of default constructor?
What does split function do in java?
What is the default size of arraylist in java?
Write a method to check if input string is palindrome?
What is the purpose of the file class in java programming?
What is identifier in java?
What is the importance of static variable?
What is the exact difference in between Unicast and Multicast object? Where will it be used?
Is an object null?
Can long be null in java?
What is method reference in java?