Originally Posted by
ben456123
One other quick question though- I'm going to be implementing those functions with Object instead of String so that they can be filled up with whatever object that a user would want to do, but because of that I'm unsure how to put the syntax for that in my main called function, whenever I try to code a line such as
You should almost definitely be using Generics instead of simply dealing with Objects- that way the user can still populate your data structure with anything, but you still have some semblance of type safety.
Originally Posted by
ben456123
parent.addChild(/*This is where I'm having trouble knowing what to put in here to correctly add a child*/);
Any tips how to word this?
Well, what do you want that method to take as a parameter? Another List? An array to be converted into a List? A single Object? Something else?