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