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

Why doesn't this code compile?
val addend = 1
infix fun Int.add(added: Int=1) = this + addend
fun main(){
  val msg = "Hello"
  println( msg shouldMatch "Hello")    
  println( 10 multiply 5 + 2)
  println( 10 add 5)
}

Answer & Solution
Correct Answer: Option D
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.