Question
What is pattern matching in Scala?
Select an option. Your answer will be checked instantly.
Correct Answer: B. Selecting behavior by comparing a value against structured cases
Explanation:
The match expression checks cases in order and can extract components.
It is more powerful than a simple switch statement.
Leave a Reply