Code Pumpkin

Tag Archives: Creational Design Patterns


Sapient Global Markets Interview Questions – Set 2

September 12, 2017
Posted by Rama Prasad

I applied for Junior Associate position (Java Developer) at Sapient Bangalore location. This was my second technical round with Sapient Global Markets, Bangalore. It was Skype interview.  You can also read my article for the interview experience of first technical round at Sapient.  From my interview experience with Sapient, I can say that their interviewers have some […]

Object Pool Design Pattern

July 29, 2017
Posted by Pumpkin

Object pool design pattern is one of the Creational Design Pattern. In very simple term, this design pattern means To Reuse the objects which are very costly to create. Object pooling is creating objects of the class at the time of creation and put them into one common pool. Now whenever application needs object of that class […]

What is the use of private constructor in java?

In Java, we can use any access modifier (i.e. public, protected or private) with constructor.  So, what are the uses of making constructor private? First thing that strikes your mind is Singleton Design Pattern which is also one of the most asked Core Java Interview Question to the 3-4 yr exp Java developers.  Apart from creating singleton class, private constructor […]

Builder Design Pattern

April 27, 2017
Posted by Pumpkin

Builder design pattern is a creational design pattern like Factory Pattern and Abstract Factory Pattern. For better understanding of  any  design pattern, You should know the problems faced by programmers before that design pattern was introduced. What are the traditional ways of creating an object of a class? We can provide either constructor or a static factory method to get the object  of […]

How to create Immutable Class in Java

Immutable class is a class which once created, it's contents can not be changed. Immutable objects are the objects whose state can not be changed once constructed.  In Java, String  and all the wrapper classes e.g. Boolean, Integer, Long, etc are immutable classes. We can create our own immutable class as well. Joshua Bloch's Effective Java has a very good explanation about why you […]

Singleton Design Pattern

In Design Pattern article we have seen different types of design pattern available. In this article we will take one of the simplest design pattern from the Creational Design Pattern. Singleton Design Pattern is part of the creational design pattern. In Singleton design pattern restricts the instantiation of a class and ensures that only one instance of the class […]

Design Patterns

April 2, 2017
Posted by Pumpkin

Design Patterns is general repeatable solution to a commonly occurring problem in software design. Rather we should call it a solution template as it will provide the standard to implement the solution not the code directly. In 1994, four authors Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides (known as Gang of Four) published a book […]

Total Post : 80
Contribute Your Articles

Interview Experiences

Related Books

Like Us On Facebook

Alexa Page Rank