June 2018
Beginner
722 pages
18h 47m
English
The Car and Truck interfaces are extending (children of) the Vehicle interface. It means that the class that implements the Car interface (let's give such a class the name CarImpl), for example, when instantiated, creates an object that has three types – Vehicle, Car, and CarImpl. These types are similar to passports of a person who is a citizen of three countries. Each citizenship carries specific rights and restrictions, and a person chooses how to present themselves in different situations of international travel, the same way an object of the CarImpl class can be cast to any of these types, provided the type is accessible in the code that does the casting. And here is what we mean by type accessibility: ...
Read now
Unlock full access