public void push(E element) {
        Node<E> tempNode = last;
        last = new Node<E>(null, last);
        last.setElement(element);
        if (tempNode != null)
            tempNode.setNext(last);
        size++;
    }