Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a program to create a binary Tree ?

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


Please Help Members By Posting Answers For Below Questions

What are the various access specifiers for java classes?

1056


Explain the differences between static and dynamic variables?

1150


Can constructor return value?

964


What is constructor and virtual function? Can we call a virtual function in a constructor?

1143


How do you reverse sort a list in java?

939


How do weakhashmap works?

1155


Can we access the non-final local variable, inside the local inner class?

1034


Why java is not 100% object-oriented?

1509


Explain oops concepts in detail?

1029


What is a top level class in java?

1031


How do you insert a line break?

908


Difference between a class and an object?

1037


What are instance variables?

1077


How to perform merge sort in java?

1060


What is the inheritance?

975