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
What is difference between static class and singleton pattern?
What is the difference between an array and an array list?
What is console based application in java?
Difference between static and dynamic class loading.
Can sleep() method causes another thread to sleep?
write a program that list all permutations of ABCDEF in which A appears before B?
Why hashcode is used in java?
Is jdk required on each machine to run a java program?
Difference between stack and queue?
What is Session reduplication and how its done?
What is a data structure java?
Compare java and python.
What is a conditional statement explain with example?
How to sort list of list in java?
What is close method? How it's different from Finalize & Dispose?