Learn Java Programming - Interface Variables (Fields) Tutorial Java 8+

Опубликовано: 19 Август 2015
на канале: Daniel Ross
3,664
32

An interface may contain a very specific type of a variable. When a variable (field) is declared in an interface it essentially becomes an implicitly declared constant. Here are the rules that apply to a variable in an interface:
Interface variables must be initialized when they are declared.
Interface variable values cannot be changed after they are declared.
The only modifiers that can be explicitly applied to an interface variable are: public, static, or final.
All interface variables are implicity marked public, static, and final.
Don't be fooled by what appears to be Default (Package-Private) access, public is the only access modifier allowed and implicitly required.


На этой странице сайта вы можете посмотреть видео онлайн Learn Java Programming - Interface Variables (Fields) Tutorial Java 8+ длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Daniel Ross 19 Август 2015, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 3,664 раз и оно понравилось 32 зрителям. Приятного просмотра!