Hi,
I have a scenario like this.
I am in Class A and i want to call one method which is there in another class(Class B). I identified i have number of requests to Class A(here class A is my
Servlet). So, now i am changing Class B to Single Ton for every request that is coming from Class A to avoid multiple objects creation for every request. Mean while i have an another idea to change method in class B as static.
Basically my question is there any difference to make object as SingleTon and call method Vs directly declare method as Static and call that method directly with class name.
Please help me to understand this concept clear to me.
Thanks