logo

Crowdly

Browser

Add to Chrome

Quelle est la sortie console du programme suivant ? fun choisir(n: Int) { ...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Quelle est la sortie console du programme suivant ?

fun choisir(n: Int) {

when (n) {

1 -> print("Un. ")

else -> error("Choix invalide. ")

}

}

fun main() {

try {

choisir(3)

print("Ok. ")

} catch (e: IllegalStateException) {

print("OUPS")

}

}

0%
0%
0%
More questions like this

Want instant access to all verified answers on moodle.iut-tlse3.fr?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome