Understanding the Prototype Design Pattern in Java

Introduction to the Prototype Pattern When working with frameworks like Spring, you may be aware that beans are singleton by default, meaning a single instance is shared across all requests. However, Spring also supports other scopes, including scope="prototype", which creates a new instance for each request. This is the essence of th ...

Posted on Wed, 09 Sep 2026 16:19:08 +0000 by drdapoo

Understanding the Prototype Design Pattern in Java

Concept When duplicating objects, there are two primary aproaches. One approach involves creating a reference that points to the same memory location as the original object. In this scenario, both references point to identical data, and modifications to one will affect the other since they share the same underlying memory address. This behaves ...

Posted on Wed, 12 Aug 2026 16:59:18 +0000 by Rohan Shenoy