:: Appends the object to the head of the list.
The head part of an existing list[subclass X] is placed in another object A, which is a subclass Y, and if both a object and the original list object inherit from the same parent class, the list is displayed as the list[parent class].
The parameters of the function are contravariant so that covariance cannot occur, so the nether is used to solve the problem. The object to which the:: Method returns is programmed as a list of upper bound object B.
interested friends please pay attention to DT Big Data Dream Factory public account: Dt_spark
Liaoliang Teacher Number: 18610086859
QQ Group: DT Big Data dream factory ①:462923555 DT Big Data dreamworks ②: 437123764 DT Big Data Dream Factory ③:418110145
Scala's classic 81st: The construction of list in Scala is type constrained inversion, covariance, and the lower bound