Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Java-Beginners Can a main method be declared final?

Have Programming Question? Ask it here!
 
 
 


Java Coder
Can a main method be declared final?
1 Answer(s)      a year ago
Posted in : Java Beginners


Hi,

Can a main method be declared final?

Thanks


Advertisement
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
 

 

 

DMCA.com