Friday, November 21, 2014

What is final modifier?

The final modifier keyword makes that the programmer cannot change the value
anymore. The actual meaning depends on whether it is applied to a class, a
variable, or a method.
  1. · final Classes- A final class cannot have sub classes.
  2. · final Variables- A final variable cannot be changed once it is initialized.
  3. · final Methods- A final method cannot be overridden by sub classes.

No comments:

Post a Comment