请问java中哪一个类可以很方便的处理“树”这个数据结构?

2024-12-18 19:09:31
推荐回答(2个)
回答1:

可以参考jdk中的TreeModel接口,可以单独拿出来对树结构进行操作。
实例可以在网上搜索一下JTree的用法。

回答2:

java.util
接口 Collection
所有超级接口:
Iterable
所有已知子接口:
BeanContext, BeanContextServices, BlockingDeque, BlockingQueue, Deque, List, NavigableSet, Queue, Set, SortedSet
所有已知实现类:
AbstractCollection, AbstractList, AbstractQueue, AbstractSequentialList, AbstractSet, ArrayBlockingQueue, ArrayDeque, ArrayList, AttributeList, BeanContextServicesSupport, BeanContextSupport, ConcurrentLinkedQueue, ConcurrentSkipListSet, CopyOnWriteArrayList, CopyOnWriteArraySet, DelayQueue, EnumSet, HashSet, JobStateReasons, LinkedBlockingDeque, LinkedBlockingQueue, LinkedHashSet, LinkedList, PriorityBlockingQueue, PriorityQueue, RoleList, RoleUnresolvedList, Stack, SynchronousQueue, TreeSet, Vector