Class declaration - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Class declaration

dhanu8288dhanu8288 USAPosts: 0Member

I was going through a code and I found a class declared like this

public class Tree {
private Node root;

public Tree(T rootData) {
    root = new Node<T>(); = rootData;
    root.children = new ArrayList<Node<T>>();

What does mean? Why is it declared like this?



Sign In or Register to comment.