Learn Java Programming - Final Reference Variables Tutorial

Pubblicato il: 07 agosto 2015
sul canale di: Daniel Ross
1,107
15

When the final keyword is applied to a reference variable and the variable has been initialized, that reference variable cannot be reassigned to a different object instance. It is important to note that when final is applied to a reference variable it does not prevent the members of the object instance from changing values. A final reference variable can only be assigned to a reference of an object instance once and only once. The value does not need to be assigned when the reference variable is declared; this kind of a reference variable is called a blank final variable. A blank final instance reference variable must be assigned a value inside of a constructor or a compiler error will occur. A blank final local reference variable must be assigned a value before it is used. The optional common naming convention for final variables is to be in uppercase with an underscore (_) separating the words.


In questa pagina del sito puoi guardare il video online Learn Java Programming - Final Reference Variables Tutorial della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Daniel Ross 07 agosto 2015, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 1,107 volte e gli è piaciuto 15 spettatori. Buona visione!