Thinking in Java Fourth Edition

以前这些经典书籍都零零散散地阅览过,现在准备重新精读一遍,随时记录读书心得。

 

启动日:2011.01.17

 

1. Holding your objects

其中,basic concepts中,他把java containers分为了两大类,一类是Collection,一类是Map

 

有一段印象颇深:

List<Apple> apples = new LinkedList<Apple>();
Thus, you’ll typically make an object of a concrete class, upcast it to the corresponding interface, and then use the interface throughout the rest of your code.

但是这种用法无法调用List接口声明以外却在其实现类中存在的方法

 

 

你可能感兴趣的:(java,apple,REST,读书)