As a transition learner from C# to Scala, I know that it'd throw an exception when integer overflow occurs in C#. Because the default behavior of compiler will check the integer overflow with keyword checked. if you want disable the exception, use keyword unchecked explicitly.
But in this book, I never find the discussion about the integer overflow. Does nothing happen when integer overflow occurs except the value should be a negative, doesn't it? Is it the default behavior in Scala? Should I look for more details in Java?
addExact,
subtractExact, multiplyExact to get exceptions on overflow in Java/Scala. --
You received this message because you are subscribed to the Google Groups "scala-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.