![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
设计模式
keepons
Maybe I am not good enough,but you still chose me in the end .What can I to do is repay you with my whole life.----Dream
展开
-
Java设计模式
当你觉得你的代码,看起来很杂乱,感觉没有艺术感。那是时候看一下设计模式了,推荐一个印度的博客,写得挺好的。英文只是些简单的单词,不用害怕。 https://javapapers.com/design-patterns/ 还有一个是中文的,我还没看,初看了一下目录,他整理的也挺好。 https://www.cnblogs.com/foryang/p/5849402.html ...转载 2018-09-24 13:40:54 · 160 阅读 · 0 评论 -
从装饰模式看DataInputStream。
装饰模式的作用是,不改变原类文件,不使用继承,动态扩展方法。 DataInputStream in = new DataInputStream(new FileInputStream(“test.txt”)); 我们知道FileInputStream是被装饰的,FileInputStream是没有readInt()这个方法的。但被DataInputStream 装饰后,就有了DataInputS...原创 2018-10-11 14:49:05 · 260 阅读 · 0 评论