Suppose you have a Kotlin program where you need to create a greeting message by combining two pieces of information: a static message that says 'Hello' and a variable containing a name. Fill in the blanks in the following code to declare these two variables and create the complete greeting message.
Constants and val variables
Creating a dynamic greeting message
Report a typo
Fill in the gaps with the relevant elements
greeting: = "Hello"
val name: String = "Kotlin"
val wholeGreeting = "$greeting, $name!"
(wholeGreeting) ___
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.