I have created singleton object. It contains couple of static methods and non-static methods. I have created one Logger class object, while initializing the singleton object. In the static method i am calling the member object method to do some operation. The sample code given below. The code is working fine.
My question here is, Does the singleton class can have static methods and call it member object method is right approach.
Well, I do not think there is any problem until and unless your singleton is not breaking at any point. If you want kindly go through this article Simply Singleton. It is a very good article on singleton and give all the aspects and issues related to Singleton.
It is perfectly alright to call the member methods (non-static) from the static methods. Many a times it is required to do the initial setup which might be a different method it can be called from the static method of returning an instance or from the private constructor.
Thanks and Regards,