Find the error

Report a typo

Which of the classes below has an error?

class Letter(val from: String, val to: String, val text: String = "Greetings, my dear friend!") {}
class Room(val width: Int, val length: Int, var height: Int) {
    init {
        width += 3
        length += 5
        height -= 1
    }
}
class Country(_name: String, _capital: String, _population: Int) {
    val name = _name
    val capital = _capital
    val population = _population
}
Select one option from the list
___

Create a free account to access the full topic