Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

singleton pattern class and static class

796466Dec 8 2010 — edited Dec 9 2010
Hi,

what is difference between the singleton pattern class and static class ?

in singleton pattern, we declare a static member[which hold one value at a time] ,static method[ which return static member value] and a private constructor[not allow to direct instantiation]. My words are -- as a singleton pattern we implement static class .

so can we say a singleton pattern is static class it means both are same or is any difference between these two ??
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 6 2011
Added on Dec 8 2010
7 comments
184 views