Can I extend singleton class in java?



Can I extend singleton class in java?..

Answer / Aneesh Yadav

No, extending a singleton class is not allowed because the primary purpose of a singleton is to ensure only one instance exists and inheritance would create multiple instances.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

What is run-time class and system class? what is their purpose?

1 Answers  


How many types of flags are there?

1 Answers  


List java api that supports threads?

1 Answers  


A abstract class extending an abstract class.Super class has both abstract and non-abstract methods.How can we implement abstract and non-abstract mehtods? Explain with snippet

3 Answers  


What is a final class ?

1 Answers  


Is class forname reflection?

1 Answers  


What is a bubble sort in java?

1 Answers  


Is singleton set an interval?

1 Answers  


What does sprintf mean?

1 Answers  


What is preparedstatement in java?

1 Answers  


What do you mean by data type?

1 Answers  


What are the two categories of data types in the java programming language?

1 Answers  


Categories