current position：Home>[thinking] the difference between singleton mode and static method - object-oriented programming
[thinking] the difference between singleton mode and static method - object-oriented programming
2022-01-26 21:55:35 【ChrisEighteen18】
I encountered a problem in the process of internship , In some cases, it's like using singleton mode to get an object and call a method And Directly call the static method of an object static It seems that they can achieve the same function and effect . What's the difference ？
This is a thought seen on a certain . The extension is in the memory control area , There are differences between the above two , In the actual development process, we should think about the design according to the reality ; Recommend a link to explain , Will be relatively detailed https://www.cnblogs.com/guozhen/p/5164374.html
author[ChrisEighteen18],Please bring the original link to reprint, thank you.