Can a main method be declared final?

Hi,

Can a main method be declared final?

Thanks

View Answers

April 11, 2013 at 12:13 PM

Hi,

Yes we can. The final method can be declare as follows:

public final String convertCurrency()

The final method can't be override in a subclass.

for more about main method be declared final in Java









Related Tutorials/Questions & Answers:
Advertisements