Search⌘ K
AI Features

Exercise: Printing Personal Information

Explore how to implement a Kotlin function that formats personal information by handling optional name, surname, and age parameters. Learn to construct clean string outputs while properly managing null values for flexible function usage.

We'll cover the following...

Problem statement

Implement formatPersonDisplay function. It should have the String result type and the following parameters:

  • The name of type String? and default value null

  • The surname of type ...