October 2018
Intermediate to advanced
370 pages
9h 15m
English
In the previous section, we explored the functionalities of inheritance by extending the Person class with the student and professor classes. In this section, we will have a closer look at the constructor and class-initialization. Let's take a very simple example:
open class A { init { println("Class A is initialized") }}open class B : A() { init { println("Class B is initialized") }}class C : B() { init { println ...
Read now
Unlock full access