007-scala properties and object Private fields of a class actual combat
The class used in the Scala class must be assigned the initial value of the DEF function if no arguments are given without the parentheses 2. No need to add public declaration getter and setter Combat getter Method: Def Agesetter method: Def Age_var Variable default build getter and setter method Val default only Generate Getter Method object Private property actual combat variable declared as private after this variable can only be used inside this class Private[this] object private Property This class's own method can only access the methods of its own objects or properties that cannot access other objects (including objects produced by this class) or method properties that are used in the configuration of the driver and the generation of methods that enable the isolation of instance members by using this method
Welcome to the vast number of enthusiasts to learn and exchange. Also welcome to join the study enthusiasts
DT Big Data Dream Factory Exchange Group: 462923555
DT Big Data public account: Dt_spark
Video Watch Links
http://www.tudou.com/plcover/Yy5F5gsurSE/
Properties and object Private fields of the 007-scala class