Can a main() method of class be invoked in another class?

Can a main() method of class be invoked in another class?

Yes! We can invoke the main() method of one class in another class. Since main() method is a static method, it can be invoked by using the class name with the method name.

By:Jalees
Date:2015-01-09 00:00:00

Yes! We can invoke the main() method of one class in another class. Since main() method is a static method, it can be invoked by using the class name with the method name.

By:vijay
Date:2013-11-09 00:00:00

Yes! We can invoke the main() method of one class in another class. Since main() method is a static method, it can be invoked by using the class name with the method name.

By:esmaeel
Date:2028-08-11 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher