Declare the linkedlist first, then add to it in the constructor.
public static LinkedList list = new LinkedList();
public LibraryUser() {
count ++;
// add to the list
list.add(this);
}
2
solved i want to add an object to the linked list