Define a sealed class called Result, which has two data classes Success and Error. Each of them has a message of type String.
Computer scienceProgramming languagesKotlinObject-oriented programmingObject-oriented programming usage
Sealed class and interface
Results
Report a typo
Write a program in Kotlin
// write code here
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.