[Solved] Erorr with the nullpointer
[ad_1] You do not set next when you create your Nodes, so next is always null. This Node(final Object element, Node prevNode) { this.element = element; prevNode = this; } should be Node(final Object element, Node prevNode) { this.element = element; prevNode.next = this; } [ad_2] solved Erorr with the nullpointer