res new Node new Node new Node null null Node NodeType number new Node

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
res = new Node(new Node(
new Node(null, null, Node.NodeType.number, 8),
new Node(null, null, Node.NodeType.number, 5),
Node.NodeType.sum,
0),
new Node(new Node(null, null, Node.NodeType.number, 6),
new Node(
new Node(null, null, Node.NodeType.number, 4),
new Node(null, null, Node.NodeType.number, 7),
Node.NodeType.sum,
0
),
Node.NodeType.multiplication,
0
),
Node.NodeType.sum,
0);