Learn Java Programming - Reference Variables Tutorial

Publié le: 29 juillet 2015
sur la chaîne: Daniel Ross
4,575
47

A reference variable is a variable that "refers" to an object, hence the title reference. Every variable must have a type that is declared at compile time (in your source code file). The type must be either a primitive data type or an object type.
(type) (variable Name) (;)
When the type is an object type, the variable is called a reference variable. Reference variables can only be assigned an object reference or the null literal. An object is created using the Java keyword new. Reference variables must be declared as one of the following object types: class types, interface types, and array types. Don't worry about interface types just yet, I will cover them in a future tutorial. In this tutorial I will explore some differences between a primitive data type variable and a reference variable. I will also introduce you to a special null literal that can be assigned.


Sur cette page du site, vous pouvez voir la vidéo en ligne Learn Java Programming - Reference Variables Tutorial durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Daniel Ross 29 juillet 2015, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 4,575 fois et il a aimé 47 téléspectateurs. Bon visionnage!