Should main method compulsorily declared in all Java classes

Should main method compulsorily declared in all Java classes

Answer: It’s not required. main() method is only required if you want to use java class as an application and would like to run independently.

Leave a Reply

Your email address will not be published. Required fields are marked *

I am not Robot *