Computer scienceProgramming languagesKotlinObject-oriented programmingObject-oriented programming usage

Sealed class and interface

Sealed classes and packages

Report a typo

Consider the following structure :

+- customer
| +- Customer.kt
| +- CustomerController.kt
| +- CustomerService.kt
| +- CustomerRepository.kt
|
+- order
+- Order.kt
+- OrderController.kt
+- OrderService.kt
+- OrderRepository.kt

Suppose there is a sealed class named Product defined in the customer package. Can a class named Book in the order package be a direct subclass of Product?

Select one option from the list
___

Create a free account to access the full topic