When to use GlueList over ArrayList or LinkedList?
This question already has an answer here:
To be honest, if you cant decide after reading info at GlueList which states in few sentences why it is better (different) and even have benchmark to see the real values and also Big-O notation - you are not in position where you have to think about use "as effective as possible" list.
If you are not sure what to use, this rule is good enough :
Do I need to select items often based on their position like in array? Then use ArrayList.
Do I need add/remove items often in middle of array? Use LinkedList
PS : I did not use LinkedList for a long time, in most "usual" cases the ArrayList is better.
链接地址: http://www.djcxy.com/p/3370.html上一篇: 获取当前目录中所有子目录的列表