I need to know how to create methods to compare two sets of singly linked lists. The only problem is that I can't put a linkedlist inside the method parameters. Please help
import java.util.*;
public class SLinkedList {
protected Node head; // head node of the list
protected Node tail;
protected int size; // number of nodes in the list
/** Default constructor that creates an empty list */
public SLinkedList() {
head = new Node(null, null); // create a dummy head
size = 0;
}
public boolean(SLinkedList obj){//tells me identifier is expected
return true;
}