What is the use try and catch in Scala? How do we handle Errors or Exceptions in Imperative Style(OOP style) in Scala?
Try, catch and finally in scala is similar to Java with a minor difference in how the catch block is written. The catch by default uses match in scala which results in cases.
Considering the order of inheritance multiple cases can be written.