Is there is any error if you have multiple main methods in
the same class?

Answer Posted / bindhu

The compilation error " main(lava.lang.String[]) is
already defined " will occur when we use have multiple main
methods in the same class?

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between local variable and global variable?

691


What is your platform’s default character encoding?

774


What is native code?

720


Why is java so important?

865


What is the purpose of object oriented programming?

709


Can we store variables in local blocks?

1037


How do you take thread dump in java?

757


When will we prefer to use set and list in java and why?

707


Explain the importance of join() method in thread class?

837


What are the main concepts of oops in java?

1092


Can we increase size of array?

761


What is the benefit of singleton pattern?

740


Is void a data type?

711


What is boolean keyword in java?

863


Where are variables stored?

734