public class First {
Second second;
public First() {
second = null;
add(second);
}
public void add(Second sec) {
sec = new Second(11);
sec.left = new Second(15);
}
}
public class Second {
public Second left;
public Second right;
public Integer value;
public Second(Integer value) {
left = null;
right = null;
this.value = value;
}
}
public class First {
Second second;
public First() {
second = add(second);
}
public Second add(Second sec) {
sec = new Second(11);
sec.left = new Second(15);
return sec;
}
}
class Second {
public Second left;
public Second right;
public Integer value;
public Second(Integer value) {
this.value = value;
}
}
public class First {
Second second;
public First(int value, int left, int right) {
second = new Second(value, left, right);
}
public First(int value) {
second = new Second(value);
}
}
class Second {
public Second left;
public Second right;
public int value;
public Second(int value, int left, int right) {
this.value = value;
this.left = new Second(left);
this.right = new Second(right);
}
public Second(int value) {
this.value = value;
}
}
public class Second {
public Second left;
public Second right;
public Integer value;
public Second(Second left, Second right, Integer value) {
this.left = left;
this.right = right;
this.value = value;
}
public Second(Integer value) {
this(null, null, value);
}