26

面试官所认为的单例模式

 5 years ago
source link: https://juejin.im/post/5b50b0dd6fb9a04f932ff53f
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
单例模式是23种GOF模式中最简单,也是最经常出现的一种设计模式,也是面试官最常爱考的一种模式,为什么呢? 因为单例模式足够简单,编写一个单例模式代码几分钟就能搞定,所以设计模式中面试官通常会选取单例模式作为出题。 下面把单例模式分几个点,分别说说哪些地方面试

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK