0
/ 10
Using this class definition:
public class Node<E> { //... instance variables public Node(E d, Node<E> n) { this.data = d;...Using this class definition:
public class Node<E> {
  //... instance variables
  public Node(E d, Node<E> n) {
    this.data = d;
    this.next = n;
  }
  public E getData() {return data; }
  public void setData(E d) {data = d; }
  public Node<E> getNext() {return next; }
  public void setNext(Node<E> n) {next = n; }
}
Complete the method build2Nodes that creates
two objects of type Node, and places the values of
the a and b parameters in these nodes. The first node (a)
should have its next field point to the 
second node created (b). The method should return
the head of the list created, that is the pointer
to the node with the value in a.
Your feedback will appear here when you check your answer.