Should a main method be compulsorily declared in all java classes?

Should a main method be compulsorily declared in all java classes?

hi,

Should a main method be compulsorily declared in all java classes?

thanks

View Answers

April 10, 2013 at 6:26 PM

Hi,

There is no need of main method be compulsorily declared in all java classes. Where as the main method we should be defined only if the source class is a java application.

For more related to main method should be compulsorily declared in all java classes

Thanks,

Ads









Related Tutorials/Questions & Answers:
Should a main method be compulsorily declared in all java classes?
What if the main() method is declared as private?
Advertisements
Can a main method be declared final?
Why is the main method declared static?
Why we should use string args[] in main method in java?
Is main method compulsory in Java?
java sleep in main method
java sleep in main method
When is java main method called?
main method
main method
main() method
What is the return type of the main method?
Can a method inside a Interface be declared as final?
Can a method inside a Interface be declared as final?
What is the arguement of main method?
Can a main method be overloaded?
Accessing non-static members through the main method in Java.
JAVA what is different between static block and public static void main(String a[]) method
Difference between throw and throws in java.
What is Public static void main
How to Use Java Functions In EL
What is the first argument of the String array in main() method?
What is the equivalent method in Java which is equivalent to clrscr() in c/c++ . The code should help to clear the output screen ?
Java Method Return Value
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method
Till Slip Program Error Free - No Main Method

Ads