Error in Line 5 and 6.
Kotlin: Type mismatch: inferred type is String but String.Companion was expected
class Robot (name: String,color :String) {
var roboName= String
var roboColor= String
init {
this.roboName=name
this.roboColor=color
}
fun makeBed()
{
println("I will make your bed.")
}
}
fun main(args: Array<String>){
var robot1=Robot("Robot1","Black")
println(robot1.roboName)
println(robot1.roboColor)
robot1.makeBed()
}