[Solved] Java Arraylist adding functionality


What you are trying to do does not make much sense. You cannot change something that is a type String to a class object. Either you need to change what is being passed to the constructor or you need to change the type of the instance variables to String.

Personally I would change the Node type variables to the String Type. You will also need to parse the token[2] so its an int. i.e Integer.parseInt(token[2]);

solved Java Arraylist adding functionality