Generic Tree( Construction)

need help to understand the Generic tree(construction) code.
Without explanation it is not easy to understand.

The Generic trees are the n-ary trees
Many children at every node

Thanks for your time!
I got the theory part and facing the issue to understand the code of Generic Tree(Construction) and looking for help to understand the code.

send me your Generic tree code.
plzz tell me
what did you not understand

Below are the same code from CB course… I want to understand it from start to end.

package generic_Tree;

import java.util.ArrayList;
import java.util.Scanner;

public class GenericTree {

public class Node {
	int data;
	ArrayList<Node> children;

	Node(int data) {
		this.data = data;
		this.children = new ArrayList<>();
	}
}

private Node root;
private int size;

GenericTree() {
	Scanner s = new Scanner(System.in);
	this.root = takeInput(s, null, 0);
}

// to take the input of generic tree.
private Node takeInput(Scanner s, Node parent, int ithChlid) {
	if (parent == null) {
		System.out.println("Enter the data for the root node");
	} else {
		System.out.println("Enter the data for the " + ithChlid + " th child of " + parent.data);
	}
	int nodedata = s.nextInt();
	Node node = new Node(nodedata);
	this.size++;

	System.out.println("Enter the number of children for " + node.data);
	int Children = s.nextInt();

	// will be executed according to the value of children
	for (int i = 0; i < Children; i++) {
		Node child = this.takeInput(s, node, i);
		node.children.add(child);
	}
	return node;
}

public void display() {
	this.display(this.root);
}

private void display(Node node) {
	// node data
	String str = node.data + "=>";
	for (int i = 0; i < node.children.size(); i++) {
		// add children data of current node.
		str = str + node.children.get(i).data + ", ";
	}
	str = str + "END";
	// Display the string for current node.
	System.out.println(str);
	// display for all nodes
	for (int i = 0; i < node.children.size(); i++) {
		this.display(node.children.get(i));
	}
}

}

I am unable to understand this code because it has not been explained properly in the Video.

It seems you have removed the video of theory part for Generic tree.

@vashisthdeepak928 for the generic tree
like take exmaple of a binary tree for a binary tree there are two childrean so we take left and right Node
but in generic tree u have to take an arraylist of Node so that u can accomdate its all child
one more chnage is that u have to take input using a for loop for each node child