理由1: ArrayList 查询快 增删慢;linkedList 查询慢 增删快。实际需求中查询远远多于增删。
理由2: java标准的写法是 ArrayList list = new ArrayList(); 但在应用时总是用接口实现: List <T> list = new ArrayList(); 这样的好处是一旦改为LinkedList,只需改动一行即可:List<T> list = new LinkedList(); 也就是说可随时改为LinkedList 如果需求发生变化
Welcome to the Rolia Blog!
Congratulations! You've signed up with your own Rolia Blog!
Click on "Next" to add the forum post to your blog.