Ask Experts Questions for FREE Help !
Ask
    Scrubdilla's Avatar
    Scrubdilla Posts: 1, Reputation: 1
    New Member
     
    #1

    Apr 27, 2010, 07:09 PM
    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?
    jmd814's Avatar
    jmd814 Posts: 10, Reputation: 2
    New Member
     
    #2

    May 19, 2010, 11:15 AM

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

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Any free way to search your family tree. [ 10 Answers ]

I am not paying ancetry.com etc. Is there any site that will help track family tree threw births and deaths for free.

Calling a constructor outside of the class [ 1 Answers ]

Ok here I am writing a game... when I got to the constructor which is called to create a character, it doesn't work. It keeps saying symbol not found when I in fact did have the same file name and parameter parsed when I called it... so what's the deal? public class SCRpg{ public static void...

Constructor Design [ 1 Answers ]

When you create a class you must create a constructor, right? so should you create more than one constructor for every class you create? 1) no argument constructor to initialize ALL private values in case the user doesn't & 2) all other possible variations depending on what the user may...

Binary ionic and binary molecular compounds [ 2 Answers ]

Compare the compositions of binary ionic and binary molecular compounds.


View more questions Search