Why singleton pattern is better than creating singleton class with static instance?


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

define polymorphism in java

0 Answers  


What are the pillars of java?

0 Answers  


Java is Pass by Value or Pass by Reference?

0 Answers   BirlaSoft,


What is number data type in java?

0 Answers  


What is bytecode verifier?

0 Answers  






abstract class Demo { public void show() { System.out.println("Hello I am In show method of Abstract class"); } } class Sample extends Demo { public void show() { super.show(); System.out.println("Hello I am In Sample "); } } public class Test { public static void main(String[] args) { //I WANT TO CALL THE METHOD OF BASE CLASS IT IS POSSIBLE OR NOT CAN WE USE SCOPE RESOLUTION OPERATOR TO CALL OR JAVA NOT SUPPORTED THAT :: OPERATORE } }

3 Answers  


Can we iterate through collection using for loop?

2 Answers   Rolta,


Name few java 8 annotations ?

0 Answers  


Which of the following classes will have more memory allocated?

0 Answers  


What is an empty class? What functionality does it offer in Java?

0 Answers   Deloitte, EXL, JPMorgan Chase,


What is a functional interface?

0 Answers  


How do you achieve singleton?

0 Answers  


Categories