mirror of
https://github.com/MartinThoma/LaTeX-examples.git
synced 2025-04-26 06:48:04 +02:00
10 lines
204 B
Java
10 lines
204 B
Java
|
public class SinglyLinkedList<E> {
|
||
|
private Node<E> head;
|
||
|
|
||
|
public void add(E object) {
|
||
|
Node<E> newNode = new Node<E>(object);
|
||
|
newNode.setNext(head);
|
||
|
head = newNode;
|
||
|
}
|
||
|
}
|