public void DeleteElement(int value) {
        if (firstElement == null) {
            System.out.print("List is empty; \n");
        } else {
            if (firstElement.value == value) {
                if (firstElement.next != null) {
                    firstElement = firstElement.next;
                } else {
                    firstElement = null;
                }
            } else {
                ListElement pointer = firstElement;
                while ((pointer.next.value != value) && (pointer != null)) {
                    pointer = pointer.next;
                }
                pointer.next = pointer.next.next;
            }
        }
    }