Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class LinkedList {
- public int size = 0;
- public Element first;
- public Element last = null;
- static class Element {
- Element prev;
- Element next;
- Object value;
- Element (Object value) {
- this.value = value;
- }
- }
- public void add (Object o) {
- Element e = new Element(o);
- first.value = e.value;
- size++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement