class SmartHome(val smartTvDevice: SmartTvDevice) {
}
I have a question in the above syntax where Val smartTvDevice is mentioned. After colon the name SmartTvDevice is a type for variable. But I learned only these types in kotlyn docs. String, float, Boolean, int. Is class name can be used to for type? Thank you
In particular, while many classes are types, some aren’t (e.g. generic classes, which need type parameters to be specified), and some types aren’t classes (e.g. interfaces, or classes with a trailing ? indicating a nullable type).