I've been playing around with linked lists and I want to know if it's possible to have an array of strings in a linked list node. I've been trying to get it to work the same way as the string "name", so that I can insert more strings into the array as needed
class Test1 {
public static void main(String[] args) {
Node n = new Node("Ace");
}
}
class Node {
private Node next;
private String name;
private String[] data;
public Node(String s1) {
s1 = name;
next = null;
}
public String[] getArray() {
return array;
}
public void setData(String s1, int point) {
name = s1;
array
}
public Node getNext() {
return next;
}
public void setNext(Node nextVal) {
next = nextVal;
}
}
Nodeto hold one and only one name? Or, can a givenNodecorrespond to more than one name?