---
title: "What is Singleton class?"  
description: "What is Singleton class?"  
author: "Amit Singh"  
published: 2011-05-07  
updated: 2020-09-17  
canonical: https://www.mindstick.com/interview/851/what-is-singleton-class  
category: "java"  
tags: ["java"]  
reading_time: 1 minute  

---

# What is Singleton class?

Singleton class is a class whose only one object can be created at a time. - To achieve this one method is that we make its constructor private and provide a static method that returns its instance.\
\
When a Singleton class is garbage - collected and then reloaded, a new Singleton instance is created.\

## Answers

### Answer by Amit Singh

Singleton class is a class whose only one object can be created at a time. - To achieve this one method is that we make its constructor private and provide a static method that returns its instance.\
\
When a Singleton class is garbage - collected and then reloaded, a new Singleton instance is created.\


---

Original Source: https://www.mindstick.com/interview/851/what-is-singleton-class

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
