In Java, final is a keyword. It has the following impact on variables, methods, and classes:
- If a variable declaration is preceded by the final keyword, then its value cannot be changed in the program.
- If in a method declaration, the method name is preceded by the final keyword, then that method cannot be overridden.
- If in a class declaration, the class name is preceded by the final keyword, then that class cannot be inherited.
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.