Possible Duplicate:
Java tree data-structure?
Is there any Java data structure implementation similar to tree and graph?
Possible Duplicate:
Java tree data-structure?
Is there any Java data structure implementation similar to tree and graph?
Not in the java.util
Collections API.
You can use the DefaultTreeModel from Swing for trees.
Jung is a graph framework.
As I answered for a similar question, the Java API contains no general API for trees/graphs, since there is no unique set of features needed in every usecase. There are quite some tree/graph-like APIs for special cases, though.
And in principle it is easy to make your own graph - one could even say that every object is in fact a node in a graph, with the values of its reference type fields being the (outgoing) neighbors.