Why should we use singleton pattern instead of static class?


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

Post New Answer

More Core Java Interview Questions

What types of inheritance does Java support?

2 Answers  


How is string immutable in java?

0 Answers  


Write a java program to check if a number is prime or not?

0 Answers  


11. static class A { 12. void process() throws Exception { throw new Exception(); } 13. } 14. static class B extends A { 15. void process() { System.out.println(”B”); } 16. } 17. public static void main(String[] args) { 18. new B().process(); 19. } What is the result? 1 B 2 The code runs with no output. 3 Compilation fails because of an error in line 12. 4 Compilation fails because of an error in line 15.

6 Answers  


Can applet in different page/s communicate with each other?

1 Answers  


Define iterator and methods in iterator?

0 Answers  


What are the difference between string, string builder, and string buffer in java?

0 Answers  


is it possible to instantiate the math class?

0 Answers  


What is a ternary operator in java? What is an interface?

0 Answers  


Why we can not force Garbage Collection?

7 Answers  


What is Java Reflection API? Why it’s so important to have?

0 Answers  


List the three steps for creating an object for a class?

0 Answers  


Categories