public void reversePointer() throws Exception {
if (this.size == 0)
throw new Exception(">>> list is empty => reverseData >>>");
Node prev = this.head;
Node curr = prev.next;
int count = 1;
while (curr != null) {
		Node ahead = curr.next;
		curr.next = prev;
		System.out.println(count);
		count++;
		prev = curr;
		curr = ahead;
	}
		Node t = this.head;
	this.head = this.tail;
	this.tail = t;
} 
      
    


 The code should work now.
 The code should work now.