Answer Posted / marshal
public class BinaryTree
extends AbstractTree
{
protected Object key;
protected BinaryTree left;
protected BinaryTree right;
public BinaryTree (
Object key, BinaryTree left, BinaryTree right)
{
this.key = key;
this.left = left;
this.right = right;
}
public BinaryTree ()
{ this (null, null, null); }
public BinaryTree (Object key)
{ this (key, new BinaryTree (), new BinaryTree()); }
// ...
}
| Is This Answer Correct ? | 7 Yes | 12 No |
Post New Answer View All Answers
What are the various access specifiers for java classes?
Explain the differences between static and dynamic variables?
Can constructor return value?
What is constructor and virtual function? Can we call a virtual function in a constructor?
How do you reverse sort a list in java?
How do weakhashmap works?
Can we access the non-final local variable, inside the local inner class?
Why java is not 100% object-oriented?
Explain oops concepts in detail?
What is a top level class in java?
How do you insert a line break?
Difference between a class and an object?
What are instance variables?
How to perform merge sort in java?
What is the inheritance?