I have this class
public class Tree { //List of branches for this tree private List> branch = new ArrayList<
While instantiating generics should be replaced with corresponding objects.
Ex:
Tree num2 = new Tree(2);