Abstract classes and interface

In the default interface, a data item is static and final. Statically, this is because it cannot be created, but why is it final?

and another question - even abstract classes cannot be created, why can it have a non-static data member?

+4
source share
2 answers
and the other question is even the abstract classes can not be instantiated,
then why it can have a non static data member??

Because in abstract classes, you can define as many functions that you want, which can then be used by its children.

+3
source

, Java ; , . , , , , .

, .

?

- , , . , , , , .

0

Source: https://habr.com/ru/post/1530836/


All Articles