Scala
Does <b>th ...
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
Does
throw
expression have a result type in Scala?
Yes, it has
No, it has not
Explanation
Although it may seem somewhat paradoxical, in Scala, throw is an expression that has a result type. Technically, an exception throw has type Nothing.
Source:
Exception handling with try expressions
exceptions
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
What will be the result of the compilation and execution of the following code? ...
What lines will the compilation error occur in: class M...
What will be the result of the following program compilation and execution? ...
Given the following code public class OverrideThrowsTes...
What will be printed to standard output stream if a tryThis() method throws an I...
What will be the result of the following code execution? ...
S
cala
Quiz
Login to learn Scala
or
Read more about
Scala Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
Scala quizzes
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
What will be printed out as a result of the following code execution / compilati...
int i = Integer.MAX_VALUE + 10; What is th...
What happens after the following code is compiled and run: ...
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment