Hello Friends, Consider this scenario. 1. All the methods in a class are static. 2. We use singleton pattern. I beleive that in both the cases we achive the same result, that is only one instance of the class. While i think its better to use case 1, but case 2 is a very popular design pattern. The reasoning is that both achieve the same result, but in case 2 one has to do a extra getInstance() first and then one can call the functions. Please, share your views. What do you think. Suresh Bansal
Journey is as important as the Destination.<br /> <br />PMP, SCJP, SCJD, SCEA (Part 1), SCMAD, SCDJWS
It depends on what you want to achieve. With the singleton implementation, you can hide the real implementation of your service. The client only knows the contract (API) but does not know about the implementation. This is easily configurable with a bridge or a property file. You can not do that with a 'static method' implementation. W.