PHP中文网2017-04-18 09:17:39
String class is special... Others can be inherited and then added methods
大家讲道理2017-04-18 09:17:39
No. Java
的类是死的, 一但写好就不再有更改能力. 你应该不是问, 通过继承来添加新的方法. 如果有的话, Scala
也不用费劲搞个隐式视图
To add methods to existing classes.
Well, this is not solid evidence either.
怪我咯2017-04-18 09:17:39
No. Scala and PHP have trait
.
Java doesn’t even have the ability to alias classes.