Inside the Friend class, declare a final field that should be available anywhere. It is called name with type String and has any default value.
Computer scienceProgramming languagesKotlinObject-oriented programmingObject-oriented programming basic
Visibility modifiers for members
Visible anywhere
Report a typo
Write a program in Kotlin
class Friend {
// 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.