what is the difference between static class and singleton class? can we create static class?

Answer Posted / sumitpalsingh

Static class always a inner class. and static class can create multiple objects.all object have different reference value.
But on the other hand SingleTon class can have only single object because every object reference variable have same reference value.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the function of static in java?

599


Why is java so popular?

705


Explain about public and private access specifiers?

607


How do you reverse a string in java without using string buffer?

641


What is static synchronization?

634






What do you mean by pointer value and address?

635


What is definition and declaration?

586


What is the use of inner class?

603


What are the 5 types of research methods?

664


What is data and its types?

636


Write a program to check string is palindrome without using loop?

635


What are streams in java 8?

616


How is string immutable in java?

607


What are loops in java? What are three types of loops?

621


How objects of a class are created if no constructor is defined in the class?

646