I have a doubt here where after so much explainations I still don’t really get the point. Why do we need to declare a Private Static Methods? Since the method is private it can be only accessed by the class itself and the internal function can be called easily without creating an instance, isn’t it? Or am I wrong for this concept?
I mean I can understand why we have a private method (because we want to keep the logic to only the class itself) and I also understand why do we need a static method (as we do not need an instance to access the method). So, my question is why do we need to make it static when it’s private? As if we do not want any other class to access it and it cannot be called directly from codes (because it’s private) but we still remain it as static?
Sorry for the confusion but yes I am confused. Can anyone help me on this concept?
Best Regards,
Yi Ying
You may need to call your static private from a static public. A static public can not access a non static private!