There is a class called Cat. This class has a private immutable field catName. Read the user input and write a function called changeName, which changes the value to the user input and returns it. Please notice that the function doesn't take any parameters and doesn't print anything.
Introduction to Kotlin reflection
Change the name
Report a typo
Write a program in Kotlin
class Solution{
}
___
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.