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


Win a copy of Java 8 in Action this week in the Java 8 forum!
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: 541
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: 9995
    
    7

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 ?
 
Similar Threads
Singleton in Java
Singleton class
Difference between in making a class as singletone and
Static methods
difference between the singleton pattern class and static class