Header Ads

  • Breaking Now

    Explain final modifier.

    'final' modifier can be applied to classes, methods and variables and the features cannot be changed. final class cannot be subclassed, methods cannot be overridden and final variables are constants.

    3 comments:

    1. In addition to above comment if variable is final, that can not be modify later on

      ReplyDelete
    2. Perfect definition.

      ReplyDelete
    3. If the keyword final is specified before any method,that couldn't be overloaded.if it is specified before class.that class can't be inherited.if it is specified before variable,that couldn't be remodified

      ReplyDelete

    Post Top Ad

    Post Bottom Ad