我比较喜欢list啦
至于你说的那三个有什么区别
那的查查

解决方案 »

  1.   

    凡事无绝对
    你要是从前面往后传值得话  list好一点
    因为要顺序存取 进行处理
    map 要用对应的key 取名字是我最头疼的事情
    总之书上说的很清楚 自己看了
    有句话我觉得很经典 系统分析就是在不断的权衡利弊
      

  2.   

    to super_rosemary(铿锵玫瑰) :
    你还在公司呀,怎么不回家?
    我比较不喜欢用list,我觉得慢,动态数组,最麻烦的啦
    取key很容易呀,传ID就行啦
      

  3.   

    仅就sun提供的集中基本数据结构说 说:
    map是后来提出的
    tree好象已经不在提倡使用了
    tree能做的,map都能做
    如果要兼容以前的程序,用tree
    新写程序用map list没什么体会
      

  4.   

    to chinesealbert(chinesealbert):
    谢谢你!
    不知道你所说的“sun提供的集中基本数据结构”在什么地方可以找到??或者正式的名称是什么?请告诉我,谢谢!
      

  5.   

    list只是存放一种类型的对象,
    而map存放一组相关的对象
    tree好像和上诉两个不是同一层次的,think in java这样说:
    To review the containers provided in the standard Java library: 
    An array associates numerical indices to objects. It holds objects of a known type so that you don’t have to cast the result when you’re looking up an object. It can be multidimensional, and it can hold primitives. However, its size cannot be changed once you create it. 
    A Collection holds single elements, while a Map holds associated pairs. 
    Like an array, a List also associates numerical indices to objects—you can think of arrays and Lists as ordered containers. The List automatically resizes itself as you add more elements. But a List can hold only Object references, so it won’t hold primitives and you must always cast the result when you pull an Object reference out of a container. 
    Use an ArrayList if you’re doing a lot of random accesses, and a LinkedList if you will be doing a lot of insertions and removals in the middle of the list. 
    The behavior of queues, deques, and stacks is provided via the LinkedList. 
    A Map is a way to associate not numbers, but objects with other objects. The design of a HashMap is focused on rapid access, while a TreeMap keeps its keys in sorted order, and thus is not as fast as a HashMap. 
    A Set only accepts one of each type of object. HashSets provide maximally fast lookups, while TreeSets keep the elements in sorted order. 
    There’s no need to use the legacy classes Vector, Hashtable and Stack in new code.
      

  6.   

    我晕~~
    难道大家都不用集合??
    能不能说说自己的体会呢??
    我想参考一下呀!
    不是有很多的高手吗??另外谢谢signboy的参与。
      

  7.   

    我认为:
    list可以做小型数据集操做大型数据较难, 小集合操作方便.
    tree可以做为大数据集操作大型数据较容易 .
    对于map我很少用, 可以去www.google.com搜索相关的内容.
      

  8.   

    是:collection具体请看:《java2 核心技术 ii 高级编程》第二章 数据结构