In Java why we write public static void main(String args[])
why not main()?
Answer Posted / sreenu karampudi
public static void main(String args[])
When the class get loaded, it will execute the static main
() method. void as it does not return anything.
| Is This Answer Correct ? | 15 Yes | 49 No |
Post New Answer View All Answers
What is a method in programming?
How can you make a class serializable in java?
What is the purpose of lambda expressions?
Explain creating threads by extending thread class ?
What is parsing in java?
Can we assign integer value to char in java?
What is difference between call by value and call by reference?
What are multiple inheritances?
Why map is used in java?
Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..
What is generic type?
Does list allow duplicates in java?
How can you make sure that your singleton class will always return single instance in multi-threaded environment?
Is constructor inherited?
What are different data structures in java?