Skip to content

Design Pattern

M. Hamza Haroon requested to merge task-9-branch into main

Write a program in java that implements Singleton design pattern.

The program should only make One object and upon creating another object, it should return the same object. Also confirm this behaviour by printing the object. Another way to determine the same object is the "==" operator, it should return true if you have the same object in both references.

Merge request reports