Ask Me Help Desk

Ask Me Help Desk (https://www.askmehelpdesk.com/forum.php)
-   Java (https://www.askmehelpdesk.com/forumdisplay.php?f=440)
-   -   Java - binary search tree node constructor (https://www.askmehelpdesk.com/showthread.php?t=467558)

  • Apr 27, 2010, 07:09 PM
    Scrubdilla
    Java - binary search tree node constructor
    I am trying to create a node constructor that intializes a string for a data spot in the node and a list for a list in the node.

    I have tried this:

    public String data;
    public List dinosaur;
    public Node ( String _data )
    {
    data = _data;
    dinosaur = new List();
    }

    It doesn't seem to work right, any ideas?
  • May 19, 2010, 11:15 AM
    jmd814

    This code is correct, you will need to provide more context and details about what it means to not work right

  • All times are GMT -7. The time now is 09:13 PM.