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
How do you print array in java?
Why string is not a wrapper class?
What are three types of loops in java?
How to split a string in java?
When will we prefer to use set and list in java and why?
How will you reverse a link list without using recursion?
What is the difference between the jdk 1.02 event model and the event-delegation model introduced with jdk 1.1?
Why is static used?
For class CFoo { }; what default methods will the compiler generate for you>?
What is a nested structure?
Why spring singleton is not thread safe?
Why should we use singleton pattern instead of static class?
What do you understand by abstract classes?
Explain serialization and deserialization in java?
What is meant by class loader? How many types are there? When will we use them?