Is there is any error if you have multiple main methods in
the same class?
Answer Posted / harathi
We can have multiple main methods with different
arguments.Compiler throws an error if we have a method
similar to public static void main(String args[])
| Is This Answer Correct ? | 21 Yes | 3 No |
Post New Answer View All Answers
What are the different types of java?
Can we define static methods inside interface?
What is java used for on a computer?
How large is a boolean?
What is difference between static variable and global variable?
What restrictions are placed on method overriding in java programming?
What is a numeric literal?
Differentiate between == and equals().
What is the public method modifier?
Is java a security risk?
how we can make a write-only class in java?
What is final keyword in java?
Which sort is best in java?
I don’t want my class to be inherited by any other class. What should I do?
Why does java does not support multiple inheritance? Explain