In Scala, Pattern Matching follows which Design Pattern? In Java, ‘isinstanceof’ operator follows which Design Pattern?
Answer Posted / Himanshu Bhatnagar
Scala's pattern matching follows the Structural Pattern Matching design pattern. It checks if an object has specific members or conforms to a particular structure. In Java, the instanceof operator follows the Type Checking design pattern, where it compares the runtime class of an object with a specified type.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers