Thursday, 12 July 2012

Java Design Pattern interview Questions and Answers

What is a software design pattern?

Latest answer: A reusable software design solution in general for the problems that are recurrently occuring. Design pattern

is not a solution but a description for how to solve a problem in different situations

What is an analysis pattern?

Latest answer: It is a software pattern which is not related to a language. It is related to a business domain like health care,

telecom

What are the differences between analysis patterns and design patterns?

Latest answer: Analysis pattern are targeted for domain architecture, where as design pattern are targeted for

implementation mechanism for some of the aspects of the domain

What is Singleton pattern?

Latest answer: Singleton pattern is one of the design patterns that is utilized for restricting instantiation of a class to one or

few specific objects.

How do you write a Thread-Safe Singleton?

Latest answer: The following are the steps to write a thread-safe singleton: Declare a Boolean variable, ‘instantiated’, to

know the status of instantiation of a class, an object of Object class and a variable of the same class with initial value as

null

What is the Reactor pattern?

Latest answer: The Reactor pattern is an architectural pattern that allows demultiplexing of event-driven applications and

dispatch service requests which are delivered by one or more application clients to an application
What are Collaboration Patterns?

Latest answer: Repeatable techniques which are utilized by people of different teams for helping them work together. The

really have nothing to do with object-oriented development

What is session facade?

Latest answer: Session Façade is one of the design pattern. It is utilized in developing enterprise applications frequently

What are Anti-Patterns?

Latest answer: A design pattern which obviously appears, but is an ineffective or far from optimal in practice. There must be

atleast two key elements

How do I document a design pattern?

Latest answer: The following are the major points for describing a pattern. Short and meaningful name for the pattern is to be

selected. Problem description and goals and constraints that may occur in that context is to be identified.

No comments:

Post a Comment