1.

Which design pattern suggests multiple classes through which request is passed and multiple but only relevant classes carry out operations on the request?(a) Singleton pattern(b) Chain of responsibility pattern(c) State pattern(d) Bridge patternThis question was addressed to me in final exam.The query is from Design Patterns topic in section Java Beans & JDBC of Java

Answer»

The CORRECT choice is (b) CHAIN of RESPONSIBILITY pattern

The explanation: Chain of responsibility pattern creates a chain of RECEIVER objects for a particular request. The sender and receiver of a request are DECOUPLED based on the type of request. This pattern is one of the behavioral patterns.



Discussion

No Comment Found

Related InterviewSolutions