inheritance - Why java doesn't allow final class to be inherited? -


this question has answer here:

as know, can't inherit final class in java want know why java doesn't allow so? reason behind it?

final means "do not inherit me" (in context, has other meaning in different contexts).

the reason developers mark class final optimizations. either can guarantee variables of class , jit can take advantage of can avoid more expensive virtual calls , rather inline methods directly.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

Redirect to a HTTPS version using .htaccess -