java.io中最常用的模式是什么? [英] What is the most used pattern in java.io?
本文介绍了java.io中最常用的模式是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
解决方案
我想他们想听到装饰图案,可以在各种流,读者和作家中找到。
其他模式(小选择):
我很确定可以找到几乎所有列出的模式的示例在这个维基百科pag e 在Java SDK中。
I was asked this question recently during my job interview, and I couldn't answer it. So, what is the most used pattern in java.io and how is it used? What are other patterns used in common java libraries?
解决方案
I guess they wanted to hear about the Decorator pattern which can be found in the various Streams, Readers and Writers.
Other patterns (small selection):
- Observer pattern in the swing libraries
- Factory pattern in the javax.xml.parsers packages
- Iterator pattern, used in collections
I'm pretty sure that one can find examples for almost all patterns listed on this wikipedia page in the Java SDK.
这篇关于java.io中最常用的模式是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文