CS计算机代考程序代写 package linear;

package linear;

public class Node { // Node class has a generic type parameter T
T data;
Node next;

public Node(T data, Node next) { // constructor name does NOT have a next to it
this.data = data;
this.next = next;
}

public String toString() {
return data.toString();
}
}