Author: saqibkhan

  • Adapter Pattern

    Adapter pattern works as a bridge between two incompatible interfaces. This type of design pattern comes under structural pattern as this pattern combines the capability of two independent interfaces. This pattern involves a single class which is responsible to join functionalities of independent or incompatible interfaces. A real life example could be a case of…

  • Prototype Pattern

    Prototype pattern refers to creating duplicate object while keeping performance in mind. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. This pattern involves implementing a prototype interface which tells to create a clone of the current object. This pattern is used…

  • Builder Pattern

    Builder pattern builds a complex object using simple objects and using a step by step approach. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. A Builder class builds the final object step by step. This builder is independent of other objects.…

  • Singleton Pattern

    Singleton pattern is one of the simplest design patterns in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. This pattern involves a single class which is responsible to create an object while making sure that only single object gets created.…

  • Abstract Factory Pattern

    Abstract Factory patterns work around a super-factory which creates other factories. This factory is also called as factory of factories. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. In Abstract Factory pattern an interface is responsible for creating a factory of…

  • Factory Pattern

    Factory pattern is one of the most used design patterns in Java. This type of design pattern comes under creational pattern as this pattern provides one of the best ways to create an object. In Factory pattern, we create object without exposing the creation logic to the client and refer to newly created object using…

  • Overview

    Design patterns represent the best practices used by experienced object-oriented software developers. Design patterns are solutions to general problems that software developers faced during software development. These solutions were obtained by trial and error by numerous software developers over quite a substantial period of time. What is Gang of Four (GOF)? In 1994, four authors…

  • Recursion

    Overview Recursion refers to a technique in a programming language where a function calls itself. The function which calls itself is called a recursive method. Characteristics A recursive function must posses the following two characteristics Learn Java in-depth with real-world projects through our Java certification course. Enroll and become a certified expert to boost your career. Recursive Factorial…

  • Sorting techniques

    Sorting refers to arranging data in a particular format. Sorting algorithm specifies the way to arrange data in a particular order. Most common orders are numerical or lexicographical order. Importance of sorting lies in the fact that data searching can be optimized to a very high level if data is stored in a sorted manner.…

  • Search techniques

    Search refers to locating a desired element of specified properties in a collection of items. We are going to start our discussion using following commonly used and simple search algorithms. Sr.No Technique & Description 1 Linear SearchLinear search searches all items and its worst execution time is n where n is the number of items.…