final keyword in java

Описание к видео final keyword in java

It is used to provide some kind of restriction to classes, method & variable in java programs.
If we declare a class as “final”.
 Inheritance Not allowed.
2 . If we declare a method as final.
 we can’t override that method.
3 . If we declare a variable as final.
 we can’t re-assign that variable.

Комментарии

Информация по комментариям в разработке