Divide by zero

Report a typo

What number will be written to the result variable?

val result =
  try {
    10 / 0 + 1
  } catch {
    case _: ArithmeticException => 42
  }
Enter a number
___

Create a free account to access the full topic