Broken сonversion

Report a typo

We have a function for debugging the application:

def printDebug(message: String): Unit = println(s"DEBUG: $message")

Fix the types in the conversion function so that the following code compiles:

implicit def conversion(in: TYPE_IN): TYPE_OUT = ???

val clientAge: Int = 42
val clientName: String = "Max"
val client = (clientAge, clientName)

printDebug(client)

Also, write the implementation so that it prints the following:

DEBUG: Max:42

Sample Input 1:

42 Max

Sample Output 1:

DEBUG: Max:42
Write a program in Scala
object Main {
implicit def conversion(in: TYPE_IN): TYPE_OUT = ???
}

Create a free account to access the full topic