Prepare for your Next Interview
This is a discussion on Singletn Class in brief within the Java forums, part of the Software Development category; Can any one tell me the Singletn Class in brief...
|
|||
|
Re: Singletn Class in brief
singleton class is used to restrict instantiation of a class to one object. This is useful when u are sure that one object for a class will improve the performance instead of creating multiple objects for the same class. The singleton class returns the references when the object is already created.
eg: when the organisation has the database which is accessed by all. If every one creates the object for establishing a connection to the database, then it will not be efficient, instead they can make it as singleton which will make use of only one connection. But the singleton class has drawbacks..... hope this will be helpfull for u..... |
|
|||
|
Re: Singletn Class in brief
Here s a goos intro with code
http://en.wikipedia.org/wiki/Singleton_pattern |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how many learners are there in the class? | jamesravid | Brainteasers | 7 | 12-04-2006 07:59 AM |
| How to Pay Attention in Class | admin | Personality Development | 0 | 10-16-2006 09:01 AM |
| What are the MessageBox Class Parameters | GeekAdmin | VB.NET | 0 | 05-21-2006 10:22 AM |
| MessageBox class In VB.NET 2005 | GeekAdmin | VB.NET | 0 | 05-21-2006 10:17 AM |
| Application Class in VB.NET | GeekAdmin | VB.NET | 0 | 05-21-2006 10:09 AM |