What is a singleton class in Java? And How to implement a singleton class?
Answer Posted / nashiinformaticssolutions
A singleton class is one that can only have one object at a time. The following procedures must be followed in order to implement a singleton class:
Verify that there is only one object in the class.
Allow the item to be accessed globally.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is printwriter in java?
Write an algorithm program in java for the following question.. In a VLSI design techniques,they used rectangles to design circuits. EVery rectangle is to be placed according to x,y coordinates. Check whether or not two rectangles overlap each other. Here overlapping of rectangles is acceptable, if 1) one rectangle intersect with other. 2) one rectangle fully covers other. The time of algorithm should not exceed o(n logn).
What is a java predicate?
Can we clone singleton object in java?
what do you mean by marker interface in java?
Is java still necessary?
What is the null?
State the significance of public, private, protected class?
Is it necessary that each try block must be followed by a catch block?
Can we override constructor in java?
What if I write static public void instead of public static void in java?
What is hashing in java?
What is flush buffer?
Why use string handling in Java?
What if static is removed from main method?