Quiz: Inheritance
Test your understanding of the concepts discussed in this chapter.
We'll cover the following...
We'll cover the following...
Technical Quiz
1.
Which statement is false about the following code?
open class Animal {
val name: String
}
class Dog(name: String) : Animal(name)
A.
Class Dog
is a subclass of class Animal
.
B.
Class Dog
has a property name
.
C.
Class Animal
can be inherited by other classes.
D.
Class Dog
can be inherited by other classes.
1 / 5
...