What is the singleton class in java?

Answer Posted / leelanarasimhareddy

A singleton is a class for which only one instance can exist
within a program. In other words, only one, single object of
that particular class can be created in a program.

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are anonymous methods and lambda expression?

426


What is java lang?

435


Explain the reason for each keyword of public static void main(string args[])?

488


Why do we only use the main method to start a program?

481


What is java web application?

462






What is transactional in java?

510


What is optional in java 8? What is the use of optional?advantages of java 8 optional?

489


What is an api in java?

482


How do I enable jvm?

463


What is cookie in java?

471


What gives java it’s “write once and run anywhere” nature?

466


I want to control database connections in my program and want that only one thread should be able to make database connection at a time. Define how can I implement this logic?

579


What is a java executable jar file?

467


Do I really have to type in the programs in the book to try them out?

576


What does el mean in java?

513