logo

Crowdly

Browser

Add to Chrome

Que produit le code suivant ? class Abeille(val nom: String, val espece: Strin...

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

Que produit le code suivant ?

class Abeille(val nom: String, val espece: String) {

init {

require(this.espece in arrayOf("Apis mellifera", "Bombus")) {

"Espèce non connue."

}

}

}

fun main() {

try {

val z = Abeille("Zoé", "Frelon")

println("OK")

} catch (e: IllegalArgumentException) {

println("INVALIDE")

}

}

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