Is there is any error if you have multiple main methods in
the same class?
Answer Posted / srikanth
No, there is no error if we have multiple main methods
in the same class.
because, while compiling we only specify one main method
name so, the JVM compiles it by taking the main method which
is specified by us while compiling.
| Is This Answer Correct ? | 3 Yes | 23 No |
Post New Answer View All Answers
how come we know the object is no more used in the class?
Which is faster call by value or call by reference?
How to make a write-only class in java?
What is the default value of local and global variables?
what is the difference between yielding and sleeping? : Java thread
What is the use of parse function in java?
How many bytes is a url?
Which category the java thread do fall in?
What do you mean by JVM?
What are heap memory and stack memory and what are memory tables.
What is boolean query?
What is the purpose of using java.lang.class class?
What is an example of character?
What is comparator in java?
What does percent mean in java?