ExamVeda
Login
Home
This question belongs to Computer Science Kotlin Program
Kotlin Program
?

The code below compiled and executed without issue before the addition of the line declaring errorStatus. Why does this line break the code?
sealed class Status(){
  object Error : Status()
  class Success : Status()
}
fun main(){
  var successStatus = Status.Success()
  var errorStatus = Status.Error()
}

Answer & Solution
Correct Answer: Option A
Let's discuss the solution. Join the discussion
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.