Hi i have this problem,
i want to create a method to make nodes for a linked list
so i have this code..:
class Node {
object item;
Node next;
public Node() {
this(null,null) }
public Node (object it,Node n) {
item = it;
next = n;
}
}
Now my problem is that when i want to create a node that it will
contents not only the "it" element...
For example if i want a node that will contain name,age and date
what should i do?
Should i use the same code (let's say item now will become studen) and
then make an addition?
Or the whole code should change?
Any help will be really appreciated.
Thank you
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"JAVA-experts" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/JAVA-experts?hl=ab
-~----------~----~----~----~------~----~------~--~---