只显示主题贴
icanfly 写道ruby语言写法让实在受不了,有时为了图简单要一连串的函数调用,java虽说代码多,但是每一步都走得很清楚。
链式编程风格啊,我记得似乎在 Effective Java 里面还是推荐的呢。
- 进入论坛 Ruby 版
halfmile 写道
2. 现在被炒的很热的 Martin Flower 推的那些设计模式,部分已在 Ruby 中内建了。有人说优秀的语言是应该看不到设计模式的痕迹,虽然那个人说的是small talk,不过挺适用描述Ruby。
Smalltalk 真是生不逢时呀,呵呵。
- 进入论坛 Ruby 版
在使用 group() 之前,都应当使用 find() 启动 matcher 开始进行匹配工作。你的第一段代码中,使用了 matches(),实际上也是启动了 matcher 进行匹配的,和使用了 find() 的效果是一样的。
- 进入论坛 入门讨论 版
bluemeteor 写道不要管什么规则,楼主如果觉得接口不适合你,直接用类好了,面向接口并不是不变法则
实现明智选择的前提是明白为什么选择这个而不选择哪个。
- 进入论坛 入门讨论 版
注意这段注释:
/**
* The following two methods exist because in, out, and err must be
* initialized to null. The compiler, however, cannot be permitted to
* inline access to them, since they are later set to more sensible values
* by initializeSystemClass().
*/
out 最终的初始化 ...
- 进入论坛 入门讨论 版
orang3333 写道thanks pikachu for replying!
跟踪代码发现,
protected void writeValue(TagWriter tagWriter) throws JspException {
tagWriter.writeAttribute("value", getDisplayString(getBoundValue(), getPropertyEditor()));
}
中getBoundValue()返回一个Date,而getPropertyEditor()返回的是null,因此最后显示的结果其 ...
- 进入论坛 Java 版







评论排行榜