【发布时间】:2025-12-10 10:55:02
【问题描述】:
public class Tree<T>
{
private Node<T> root;
public Tree(T rootData)
{
root = new Node<T>();
root.data = rootData;
root.children = new ArrayList<Node<T>>();
}
}
我找到了这样声明类的代码?什么意思?
【问题讨论】:
-
你对其中的哪一部分有理解困难?
-
关于generic类型。
-
我没看懂
部分