Which type of application would benefit from using the Singleton pattern?

Which type of application would benefit from using the Singleton pattern?

Which type of application would benefit from using the Singleton pattern?

A.
An application that interacts with external systems in serial fashion.

B.
An application that interacts with external systems in parallel fashion.

C.
A clustered application that can support 200 concurrent users.

D.
An application that requires remote monitoring capabilities



Leave a Reply 6

Your email address will not be published. Required fields are marked *


Reviewer

Reviewer

Any explanation for answer D ?

Pesho

Pesho

Answer is B

Stephen Ubogu

Stephen Ubogu

I think D. it can be used for logging

Ashishkumar

Ashishkumar

D.

There are several places where it is advisable to use the singleton pattern. For example: logging, caching, load balancing, configuration, communication (IO or remote to avoid poor performance) and DB connection-pooling. One example of a singleton in the Java API is the Runtime class.