aspose file tools*
The moose likes Beginning Java and the fly likes what is the difference between a singleton class and a class with all static methods ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "what is the difference between a singleton class and a class with all static methods ?" Watch "what is the difference between a singleton class and a class with all static methods ?" New topic
Author

what is the difference between a singleton class and a class with all static methods ?

Monica. Shiralkar
Ranch Hand

Joined: Jul 07, 2012
Posts: 644
what is the difference between a singleton class and a class with all static methods when both can serve the same functionality?

thanks
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10451
    
    8

One obvious difference would be that you would interact with the instance of the singleton and whatever state changes (if any) would be shared between all the objects accessing that instance. Besides this, can you think of any other difference(s)?
Moving to a more appropriate forum


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: what is the difference between a singleton class and a class with all static methods ?